-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdocker-compose.yml
99 lines (91 loc) · 2.75 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
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
services:
# This service runs the postgres DB used by dagster for run storage, schedule storage,
# and event log storage.
# Tests use `postgres:11` image.
# https://github.com/dagster-io/dagster/blob/0.11.9/python_modules/libraries/dagster-postgres/dagster_postgres_tests/docker-compose.yml
dagster-postgresql:
image: postgres:11
container_name: dagster-postgresql
volumes:
- nmdc_runtime_postgres_data:/var/lib/postgresql/data
environment:
POSTGRES_USER: "postgres_user"
POSTGRES_PASSWORD: "postgres_password"
POSTGRES_DB: "postgres_db"
# This service runs dagit.
# Since our instance uses the QueuedRunCoordinator, any runs submitted from dagit will be put on
# a queue and later dequeued and launched by dagster-daemon.
dagster-dagit:
build:
context: .
dockerfile: nmdc_runtime/dagster.Dockerfile
container_name: dagster-dagit
entrypoint: ["tini", "--", "../lib/nmdc_runtime/site/entrypoint-dagit.sh"]
expose:
- "3000"
ports:
- "3000:3000"
env_file:
- .env
environment:
DAGSTER_POSTGRES_USER: "postgres_user"
DAGSTER_POSTGRES_PASSWORD: "postgres_password"
DAGSTER_POSTGRES_DB: "postgres_db"
depends_on:
- dagster-postgresql
restart: on-failure
volumes:
- ./:/opt/dagster/lib
# This service runs the dagster-daemon process, which is responsible for taking runs
# off of the queue and launching them, as well as creating runs from schedules or sensors.
dagster-daemon:
build:
context: .
dockerfile: nmdc_runtime/dagster.Dockerfile
container_name: dagster-daemon
entrypoint: ["tini", "--", "../lib/nmdc_runtime/site/entrypoint-daemon.sh"]
restart: on-failure
env_file:
- .env
environment:
DAGSTER_POSTGRES_USER: "postgres_user"
DAGSTER_POSTGRES_PASSWORD: "postgres_password"
DAGSTER_POSTGRES_DB: "postgres_db"
depends_on:
- dagster-postgresql
volumes:
- ./:/opt/dagster/lib
fastapi:
build:
context: .
dockerfile: nmdc_runtime/fastapi.Dockerfile
container_name: fastapi
ports:
- "8000:8000"
command: ["uvicorn", "nmdc_runtime.api.main:app", "--reload", "--host", "0.0.0.0", "--port", "8000"]
env_file:
- .env
depends_on:
- mongo
volumes:
- .:/code
mongo:
image: mongo:6.0.4
container_name: mongo
ports:
- "27018:27017"
volumes:
- nmdc_runtime_mongo_data:/data/db
- ./tests:/app_tests
restart: unless-stopped
environment:
MONGO_INITDB_ROOT_USERNAME: admin
MONGO_INITDB_ROOT_PASSWORD: root
volumes:
nmdc_runtime_postgres_data:
driver: local
nmdc_runtime_mongo_data:
driver: local
secrets:
mongoKeyFile:
file: ./mongoKeyFile