Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.

Commit

Permalink
Add docker compose to run motion with singularity
Browse files Browse the repository at this point in the history
Add docker compose to start up Motion with Singularity backing store on
a shared volume.

Fixes #53
  • Loading branch information
masih committed Aug 25, 2023
1 parent 91fda1b commit a2ed1c3
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
version: "3"

services:
db:
image: postgres:15
restart: always
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 5s
timeout: 5s
retries: 5
environment:
POSTGRES_USER: ${SINGULARITY_DB_USER:-postgres}
POSTGRES_PASSWORD: ${SINGULARITY_DB_PASSWORD:-postgres}
POSTGRES_DB: ${SINGULARITY_DB_NAME:-singularity}
volumes:
- motion-singularity-volume:/var/lib/postgresql/data
ports:
- 5432:5432

singularity_api:
image: ghcr.io/data-preservation-programs/singularity:main
command: run api --bind :9090
ports:
- 9090:9090
environment:
DATABASE_CONNECTION_STRING: postgres://${SINGULARITY_DB_USER:-postgres}:${SINGULARITY_DB_PASSWORD:-postgres}@db:5432/${SINGULARITY_DB_NAME:-singularity}
depends_on:
db:
condition: service_healthy

singularity_dataset_worker:
image: ghcr.io/data-preservation-programs/singularity:main
command: run dataset-worker
environment:
DATABASE_CONNECTION_STRING: postgres://postgres:postgres@db:5432/singularity
depends_on:
db:
condition: service_healthy

motion:
image: ghcr.io/filecoin-project/motion:main
entrypoint: motion --experimentalSingularityStore --experimentalRemoteSingularityAPIUrl=http://singularity_api:9090/api
ports:
- 40080:40080
environment:
- MOTION_STORE_DIR=/usr/src/app/storage
volumes:
- motion-singularity-volume:/usr/src/app/storage

volumes:
motion-singularity-volume:

0 comments on commit a2ed1c3

Please sign in to comment.