Skip to content

Commit

Permalink
Add mongodb to docker-compose.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
gammazero committed Nov 10, 2023
1 parent c83d9f6 commit 01736e7
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,25 @@ services:
ports:
- 5432:5432

mongodb:
image: mongo:6.0
hostname: mongodb
restart: always
environment:
MONGO_INITDB_ROOT_USERNAME: ${MONGODB_AUTH_USERNAME:-root}
MONGO_INITDB_ROOT_PASSWORD: ${MONGODB_AUTH_PASSWORD:-changeme}
MONGO_INITDB_DATABASE: ${MONGODB_DATABASE:-metadata}
ports:
- '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

singularity_api:
image: ghcr.io/data-preservation-programs/singularity:${SINGULARITY_VERSION:-v0.5.9}
command: run api --bind :9090
Expand Down Expand Up @@ -122,18 +141,27 @@ services:

cloudserver:
image: ghcr.io/filecoin-project/motion-cloudserver:${MOTION_CLOUDSERVER_VERSION:-0.1.1}
restart: always
environment:
REMOTE_MANAGEMENT_DISABLE: 1
S3DATA: 'multiple'
MOTION_HOST: 'motion'
S3METADATA: 'mongodb'
MONGODB_HOSTS: 'mongodb:27017'
MONGODB_AUTH_USERNAME: ${MONGODB_AUTH_USERNAME:-root}
MONGODB_AUTH_PASSWORD: ${MONGODB_AUTH_PASSWORD:-changeme}
MONGODB_DATABASE: ${MONGODB_DATABASE:-metadata}
ports:
- "8000:8000"
volumes:
- ${MOTION_HOME:-$HOME/.motion}/zenko/localData:/usr/src/app/localData
- ${MOTION_HOME:-$HOME/.motion}/zenko/localMetadata:/usr/src/app/localMetadata
- ${S3AUTH_CONFIG:-$PWD/authdata.json}:/usr/src/app/conf/authdata.json
depends_on:
- motion
motion:
condition: service_started
mongodb:
condition: service_started

volumes:
motion-singularity-volume:
Expand Down

0 comments on commit 01736e7

Please sign in to comment.