Skip to content

Commit

Permalink
Merge pull request #12 from filecoin-project/move-md-mongodb-update
Browse files Browse the repository at this point in the history
fix: get singularity to work correctly again
  • Loading branch information
elijaharita authored Nov 13, 2023
2 parents 01736e7 + 53a2b1c commit a2462b5
Showing 1 changed file with 39 additions and 19 deletions.
58 changes: 39 additions & 19 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,29 @@ services:
MONGO_INITDB_ROOT_PASSWORD: ${MONGODB_AUTH_PASSWORD:-changeme}
MONGO_INITDB_DATABASE: ${MONGODB_DATABASE:-metadata}
ports:
- '27017:27017'
- 27017:27017
volumes:
- ${MOTION_HOME:-$HOME/.motion}/zenko/mongodbMetadata:/data/db
# healthcheck:
# test: mongo --eval 'db.runCommand("ping").ok' localhost:27017/${MONGODB_DATABASE:-metadata} --quiet
# interval: 10s
# timeout: 5s
# retries: 10
# start_period: 30s
healthcheck:
test: mongo --eval 'db.runCommand("ping").ok' localhost:27017/${MONGODB_DATABASE:-metadata} --quiet
interval: 10s
timeout: 5s
retries: 10
start_period: 30s

singularity_admin_init:
image: ghcr.io/data-preservation-programs/singularity:${SINGULARITY_VERSION:-v0.5.9}
command: admin init
volumes:
- motion-singularity-volume:/usr/src/app/storage
environment:
DATABASE_CONNECTION_STRING: postgres://${SINGULARITY_DB_USER:-postgres}:${SINGULARITY_DB_PASSWORD:-postgres}@db:5432/${SINGULARITY_DB_NAME:-singularity}
LOTUS_TEST:
LOTUS_API:
LOTUS_TOKEN:
depends_on:
db:
condition: service_healthy

singularity_api:
image: ghcr.io/data-preservation-programs/singularity:${SINGULARITY_VERSION:-v0.5.9}
Expand All @@ -49,9 +63,14 @@ services:
LOTUS_TEST:
LOTUS_API:
LOTUS_TOKEN:
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9090/health"]
interval: 5s
timeout: 5s
retries: 5
depends_on:
db:
condition: service_healthy
singularity_admin_init:
condition: service_completed_successfully

singularity_dataset_worker:
image: ghcr.io/data-preservation-programs/singularity:${SINGULARITY_VERSION:-v0.5.9}
Expand All @@ -64,8 +83,8 @@ services:
LOTUS_API:
LOTUS_TOKEN:
depends_on:
db:
condition: service_healthy
singularity_admin_init:
condition: service_completed_successfully

singularity_deal_pusher:
image: ghcr.io/data-preservation-programs/singularity:${SINGULARITY_VERSION:-v0.5.9}
Expand All @@ -78,8 +97,8 @@ services:
LOTUS_API:
LOTUS_TOKEN:
depends_on:
db:
condition: service_healthy
singularity_admin_init:
condition: service_completed_successfully

singularity_deal_tracker:
image: ghcr.io/data-preservation-programs/singularity:${SINGULARITY_VERSION:-v0.5.9}
Expand All @@ -91,9 +110,10 @@ services:
LOTUS_TEST:
LOTUS_API:
LOTUS_TOKEN:
MARKET_DEAL_URL:
depends_on:
db:
condition: service_healthy
singularity_admin_init:
condition: service_completed_successfully

singularity_content_provider:
image: ghcr.io/data-preservation-programs/singularity:${SINGULARITY_VERSION:-v0.5.9}
Expand All @@ -108,13 +128,13 @@ services:
LOTUS_API:
LOTUS_TOKEN:
depends_on:
db:
condition: service_healthy
singularity_admin_init:
condition: service_completed_successfully

motion:
platform: linux/amd64
image: ghcr.io/filecoin-project/motion:${MOTION_VERSION:-v0.2.3}
entrypoint: motion --experimentalSingularityStore --experimentalRemoteSingularityAPIUrl=http://singularity_api:9090 --experimentalSingularityContentURLTemplate=${SINGULARITY_CONTENT_PROVIDER_DOMAIN:-http://singularity_content_provider:7778}/piece/{PIECE_CID}
entrypoint: motion --experimentalSingularityStore --experimentalRemoteSingularityAPIUrl=singularity_api:9090 --experimentalSingularityContentURLTemplate=${SINGULARITY_CONTENT_PROVIDER_DOMAIN:-http://singularity_content_provider:7778}/piece/{PIECE_CID}
ports:
- 40080:40080
environment:
Expand Down Expand Up @@ -161,7 +181,7 @@ services:
motion:
condition: service_started
mongodb:
condition: service_started
condition: service_healthy

volumes:
motion-singularity-volume:
Expand Down

0 comments on commit a2462b5

Please sign in to comment.