-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yaml
152 lines (146 loc) · 3.68 KB
/
compose.yaml
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
services:
mongo:
image: mongo
restart: always
env_file:
- .env
ports:
- "27017:27017"
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: example
MONGO_INIT_DATABASE: cloud
volumes:
- ${MONGO_DATA_PATH}:/data/db
networks:
qdash:
ipv4_address: 172.22.0.2
mongo-express:
image: mongo-express
restart: always
env_file:
- .env
ports:
- "8081:8081"
environment:
ME_CONFIG_MONGODB_ADMINUSERNAME: root
ME_CONFIG_MONGODB_ADMINPASSWORD: example
ME_CONFIG_MONGODB_URL: mongodb://root:example@${MONGO_HOST}:27017/
ME_CONFIG_BASICAUTH: false
depends_on:
- mongo
networks:
qdash:
ipv4_address: 172.22.0.3
postgres:
image: postgres:14
restart: always
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: prefect
POSTGRES_DB: prefect
ports:
- "5432:5432"
volumes:
- ${POSTGRES_DATA_PATH}:/var/lib/postgresql/data
networks:
qdash:
ipv4_address: 172.22.0.4
prefect-server:
image: prefecthq/prefect:2-python3.10
restart: always
env_file:
- .env
entrypoint: ["/bin/bash", "-c"]
command: ["prefect server start --host 0.0.0.0"]
ports:
- "4200:4200"
environment:
- PREFECT_API_DATABASE_CONNECTION_URL=postgresql+asyncpg://postgres:prefect@${POSTGRES_HOST}:5432/prefect
- PREFECT_EXPERIMENTAL_ENABLE_ENHANCED_CANCELLATION=True
- PREFECT_WORKER_WEBSERVER_HOST=0.0.0.0
- PREFECT_WORKER_WEBSERVER_PORT=9090
depends_on:
- postgres
networks:
qdash:
ipv4_address: 172.22.0.5
qcflow:
build:
context: .
dockerfile: ./backend/qcflow/Dockerfile
restart: always
env_file:
- .env
- .slack.env
depends_on:
- prefect-server
- mongo
volumes:
- ./backend/qcflow:/app/qcflow
- ./backend/dbmodel:/app/dbmodel
- ${CALIB_DATA_PATH}:/app/calib_data
working_dir: /app/qcflow
command: python deployment/${ENV}/main.py
environment:
- BACKEND_URL=http://${QDASH_SERVER_HOST}:5715
- PREFECT_API_URL=http://${PREFECT_HOST}:4200/api
- PREFECT_EXPERIMENTAL_ENABLE_EXTRA_RUNNER_ENDPOINTS=True
- PREFECT_EXPERIMENTAL_ENABLE_ENHANCED_CANCELLATION=True
- PREFECT_RUNNER_SERVER_HOST=127.0.0.1
- PYTHONPATH=/app:/app/qcflow:/app/dbmodel
network_mode: host
server:
build:
context: .
dockerfile: ./backend/server/Dockerfile
restart: always
privileged: true
env_file:
- .env
ports:
- "5715:5715"
# expose:
# - "80"
volumes:
- ./backend/server:/app/server
- ./backend/dbmodel:/app/dbmodel
- ${CALIB_DATA_PATH}:/app/calib_data
- ${QPU_DATA_PATH}:/app/qpu_data
working_dir: /app/server
command: gunicorn main:app --workers 4 --worker-class uvicorn.workers.UvicornWorker --reload --bind 0.0.0.0:5715 --log-level info
develop:
watch:
- action: sync
path: ./backend/server
target: /app/server
depends_on:
- mongo
- prefect-server
environment:
- PYTHONPATH=/app:/app/dbmodel
- CALIB_DATA_PATH=/app/calib_data
- QPU_DATA_PATH=/app/qpu_data
- PREFECT_API_URL=http://${PREFECT_HOST}:4200/api
network_mode: host
client:
build:
context: .
dockerfile: ./client/Dockerfile
volumes:
- ./client:/app
- /app/node_modules
restart: always
env_file:
- .env
ports:
- "5714:5714"
depends_on:
- server
network_mode: host
networks:
qdash:
driver: bridge
ipam:
config:
- subnet: 172.22.0.0/24