-
Notifications
You must be signed in to change notification settings - Fork 16
/
docker-compose.yml
54 lines (49 loc) · 1.36 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
version: "2.1"
services:
db:
image: postgres:15
restart: always
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: singularity
volumes:
- singularity_db:/var/lib/postgresql/data
ports:
- 5432:5432
singularity_init:
image: ghcr.io/data-preservation-programs/singularity:main
command: admin init
restart: on-failure # Restart only on failure
depends_on:
db:
condition: service_healthy
singularity_api:
image: ghcr.io/data-preservation-programs/singularity:main
command: run api --bind :9090
ports:
- 9090:9090
environment:
DATABASE_CONNECTION_STRING: postgres://postgres:postgres@db:5432/singularity
depends_on:
db:
condition: service_healthy
singularity_init:
condition: service_completed_successfully
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
singularity_init:
condition: service_completed_successfully
volumes:
singularity_db: