-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
121 lines (121 loc) · 3.47 KB
/
docker-compose.yaml
File metadata and controls
121 lines (121 loc) · 3.47 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
x-healthcheck-http: &healthcheck-http
interval: 30s
timeout: 10s
retries: 5
start_period: 15s
start_interval: 2s
services:
postgres:
image: postgres:18-alpine
container_name: metis-postgres
environment:
POSTGRES_DB: ${POSTGRES_DB:-metis}
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-password}
ports:
- "5432:5432"
healthcheck:
test:
- "CMD-SHELL"
- "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"
<<: *healthcheck-http
metis-db-migrations:
build:
context: .
dockerfile: deployment/images/migration.Dockerfile
container_name: metis-db-migration
restart: on-failure
depends_on:
postgres:
condition: service_healthy
command:
- "-path"
- "/migrations"
- "-database"
- "postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}?sslmode=disable"
- "up"
valkey:
image: valkey/valkey:alpine3.22
container_name: metis-valkey
ports:
- "6379:6379"
command: valkey-server --requirepass ${REDIS_PASSWORD:-password}
restart: unless-stopped
healthcheck:
test:
- CMD-SHELL
- valkey-cli -a ${REDIS_PASSWORD:-password} ping | grep PONG
<<: *healthcheck-http
nats:
image: nats:2.12.4-alpine
container_name: metis-nats
ports:
- "4222:4222"
- "8222:8222"
command:
- "--http_port=8222"
- "--user=${NATS_USER:-nats}"
- "--pass=${NATS_PASSWORD:-nats}"
healthcheck:
test:
- "CMD"
- "wget"
- "--spider"
- "-q"
- "http://localhost:8222/healthz"
<<: *healthcheck-http
metis-api:
build:
context: .
dockerfile: deployment/images/api.Dockerfile
container_name: metis-api
restart: on-failure
depends_on:
metis-db-migrations:
condition: service_completed_successfully
nats:
condition: service_healthy
valkey:
condition: service_healthy
environment:
DATABASE_URL: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
REDIS_URL: redis://:${REDIS_PASSWORD:-password}@valkey:6379
NATS_URL: nats://${NATS_USER:-nats}:${NATS_PASSWORD:-nats}@nats:4222
ports:
- "8080:8080"
metis-engine-nextflow:
build:
context: .
dockerfile: deployment/images/nextflow-engine.Dockerfile
container_name: metis-engine-nextflow
restart: on-failure
depends_on:
metis-db-migrations:
condition: service_completed_successfully
nats:
condition: service_healthy
valkey:
condition: service_healthy
environment:
DATABASE_URL: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
REDIS_URL: redis://:${REDIS_PASSWORD:-password}@valkey:6379
NATS_URL: nats://${NATS_USER:-nats}:${NATS_PASSWORD:-nats}@nats:4222
volumes:
- ./deployment/configs/engine-config.yaml:/etc/metis/engine-config.yaml:ro
# Add your local workflows here
- ./workflows:/root/workflows:ro
command: "metis-engine-generic server --engine-config /etc/metis/engine-config.yaml"
extra_hosts:
- "host.docker.internal:host-gateway"
metis-ui:
build:
context: .
dockerfile: deployment/images/ui.Dockerfile
container_name: metis-ui
restart: on-failure
depends_on:
- metis-api
environment:
API_URL: http://metis-api:8080/
ports:
- "80:80"