Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: combine usages of docker-compose.yml files into a single file #566

Merged
merged 1 commit into from
Feb 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: "3.9"
services:
bencher_api_compose:
image: ghcr.io/bencherdev/bencher-api:latest
Expand Down
37 changes: 0 additions & 37 deletions docker/docker-compose.arm64.yml

This file was deleted.

21 changes: 13 additions & 8 deletions docker/docker-compose.amd64.yml → docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: "3.9"
services:
bencher_api_compose:
build:
Expand All @@ -7,18 +6,23 @@ services:
args:
MOLD_VERSION: 2.34.1
LITESTREAM_VERSION: 0.3.13
LITESTREAM_ARCH: amd64
# If you are calling `docker compose` directly, you can set the `ARCH` environment variable
# to the desired architecture.
# x64 example: `ARCH=x86_64 docker compose build`
LITESTREAM_ARCH: ${ARCH:-arm64}
image: bencher-api
container_name: bencher_api
ports:
- 61016:61016
volumes:
- "../services/api/etc:/etc/bencher"
- "../services/api/data:/var/lib/bencher/data"
# environment:
# Set configuration string or filepath
# BENCHER_CONFIG:
# BENCHER_CONFIG_PATH:
# Mount the configuration directory
- "./services/api/etc:/etc/bencher"
# Mount the database directory
- "./services/api/data:/var/lib/bencher/data"
# environment:
# Set configuration string or file path
# - BENCHER_CONFIG=
# - BENCHER_CONFIG_PATH=

bencher_console_compose:
build:
Expand All @@ -29,6 +33,7 @@ services:
ports:
- 3000:3000
environment:
# Set the API URL to the localhost IPv4 address
- BENCHER_API_URL=http://127.0.0.1:61016
# This is needed for Docker-to-Docker communication when using a local `BENCHER_API_URL`
# Do not set this when using a remote `BENCHER_API_URL`, such as https://bencher.example.com
Expand Down
6 changes: 3 additions & 3 deletions docker/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ function check_architecture() {
fi
}

ARCH=${1:-$(check_architecture)}

docker compose -f docker/docker-compose.$ARCH.yml up --build
export ARCH=${1:-$(check_architecture)}
script_dir=`dirname $0`
docker compose -f $script_dir/docker-compose.yml up --build