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

compose.yaml rough edges #1125

Merged
merged 1 commit into from
Jun 17, 2024
Merged
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
19 changes: 16 additions & 3 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ x-janus-migrate: &janus_migrate
- "60"
depends_on:
postgres:
condition: service_started
condition: service_healthy

x-janus-environment: &janus_environment
RUST_LOG: info
Expand Down Expand Up @@ -54,6 +54,17 @@ services:
image: docker.io/library/postgres:16
ports:
- "5432:5432"
healthcheck:
test:
- "CMD"
- "/bin/sh"
- "-c"
- |
psql postgres://[email protected]/divviup -c "" && \
psql postgres://[email protected]/janus_1 -c "" && \
psql postgres://[email protected]/janus_2 -c ""
interval: 1s
retries: 10
restart: always
environment:
POSTGRES_PASSWORD: postgres
Expand All @@ -70,14 +81,15 @@ services:
DATABASE_URL: postgres://postgres:postgres@postgres:5432/divviup
depends_on:
postgres:
condition: service_started
condition: service_healthy

pair_aggregator:
<<: *divviup_image
entrypoint:
- /bin/sh
- -c
- |
test -f /tmp/done || \
/divviup --url=http://localhost:8080 --token="" \
aggregator create \
--name=leader --api-url=http://janus_1_aggregator:8080/aggregator-api \
Expand All @@ -88,7 +100,8 @@ services:
/divviup --url=http://localhost:8080 --token="" \
aggregator create \
--name=helper --api-url=http://janus_2_aggregator:8080/aggregator-api \
--bearer-token=0000
--bearer-token=0000 && \
touch /tmp/done
network_mode: service:divviup_api
depends_on:
divviup_api:
Expand Down
Loading