forked from Qiskit/qiskit-serverless
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-dev.yml
187 lines (187 loc) · 4.89 KB
/
docker-compose-dev.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
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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
# compose config for running images based on local files
services:
jupyter:
container_name: qs-jupyter
build:
context: ./
dockerfile: Dockerfile-notebook
profiles: ["jupyter", "full"]
ports:
- 8888:8888
environment:
- JUPYTER_TOKEN=123
- GATEWAY_HOST=http://gateway:8000
networks:
- safe-tier
ray-head:
container_name: ray-head
build:
context: ./
dockerfile: Dockerfile-ray-node
args:
TARGETARCH: "${TARGETARCH:-amd64}"
entrypoint: [
"env", "RAY_LOG_TO_STDERR=1", "ray", "start", "--head", "--port=6379",
"--dashboard-host=0.0.0.0", "--block"
]
ports:
- 8265:8265
privileged: true
volumes:
- /dev/shm:/dev/shm
networks:
- safe-tier
postgres:
image: postgres
environment:
POSTGRES_DB: testkeycloakdb
POSTGRES_USER: testkeycloakuser
POSTGRES_PASSWORD: testkeycloakpassword
networks:
- safe-tier
restart:
always
keycloak:
container_name: keycloak
image: bitnami/keycloak:20.0.5-debian-11-r4
volumes:
- ./realm-export.json:/opt/keycloak/data/import/realm-export.json
environment:
KEYCLOAK_DATABASE_HOST: postgres
KEYCLOAK_DATABASE_NAME: testkeycloakdb
KEYCLOAK_DATABASE_USER: testkeycloakuser
KEYCLOAK_DATABASE_SCHEMA: public
KEYCLOAK_DATABASE_PASSWORD: testkeycloakpassword
KEYCLOAK_ADMIN_USER: admin
KEYCLOAK_ADMIN_PASSWORD: 123
KEYCLOAK_HTTP_PORT: 8080
KEYCLOAK_EXTRA_ARGS: "-Dkeycloak.import=/opt/keycloak/data/import/realm-export.json"
ports:
- 8085:8080
depends_on:
- postgres
networks:
- safe-tier
restart:
always
gateway:
container_name: gateway
build:
context: ./
dockerfile: gateway/Dockerfile
command: gunicorn main.wsgi:application --bind 0.0.0.0:8000 --workers=4
ports:
- 8000:8000
environment:
- DEBUG=1
- RAY_HOST=http://ray-head:8265
- CLIENT_ID=gateway-client
- DJANGO_SUPERUSER_USERNAME=admin
- DJANGO_SUPERUSER_PASSWORD=123
- DJANGO_SUPERUSER_EMAIL=admin@noemail.com
- SETTING_KEYCLOAK_URL=http://keycloak:8080
- SETTING_KEYCLOAK_REALM=quantum-serverless
- SETTINGS_KEYCLOAK_CLIENT_SECRET=supersecret
- SITE_HOST=http://gateway:8000
# - SETTINGS_AUTH_MECHANISM=default #custom_token
# - SETTINGS_TOKEN_AUTH_URL=<URL_FOR_TOKEN_VERIFICATION>
- DATABASE_HOST=postgres
- DATABASE_PORT=5432
- DATABASE_NAME=testkeycloakdb
- DATABASE_USER=testkeycloakuser
- DATABASE_PASSWORD=testkeycloakpassword
networks:
- safe-tier
volumes:
- program-artifacts:/usr/src/app/media/
depends_on:
- keycloak
- postgres
scheduler:
container_name: scheduler
build:
context: ./
dockerfile: gateway/Dockerfile
entrypoint: "./scripts/scheduler.sh"
environment:
- DEBUG=0
- DATABASE_HOST=postgres
- DATABASE_PORT=5432
- DATABASE_NAME=testkeycloakdb
- DATABASE_USER=testkeycloakuser
- DATABASE_PASSWORD=testkeycloakpassword
- RAY_CLUSTER_MODE_LOCAL_HOST=http://ray-head:8265
- RAY_CLUSTER_MODE_LOCAL=1
networks:
- safe-tier
volumes:
- program-artifacts:/usr/src/app/media/
depends_on:
- keycloak
- postgres
repository-server:
container_name: repository-server
build:
context: ./
dockerfile: repository/Dockerfile
profiles: [ "full", "repo" ]
command: gunicorn main.wsgi:application --bind 0.0.0.0:8060 --workers=4
ports:
- 8060:8060
environment:
- DEBUG=1
- DJANGO_SUPERUSER_USERNAME=admin
- DJANGO_SUPERUSER_PASSWORD=123
- DJANGO_SUPERUSER_EMAIL=admin@noemail.com
- DATABASE_HOST=repository-postgres
- DATABASE_PORT=5432
- DATABASE_NAME=repository_db
- DATABASE_USER=repository_user
- DATABASE_PASSWORD=repository_password
depends_on:
- postgres
networks:
- safe-tier
repository-postgres:
image: postgres
profiles: [ "full", "repo" ]
environment:
POSTGRES_DB: repository_db
POSTGRES_USER: repository_user
POSTGRES_PASSWORD: repository_password
networks:
- safe-tier
restart:
always
prometheus:
image: prom/prometheus:v2.44.0
profiles: [ "full" ]
ports:
- 9000:9090
loki:
image: grafana/loki:2.8.4
profiles: [ "full" ]
ports:
- 3100:3100
command: -config.file=/etc/loki/local-config.yaml
networks:
- safe-tier
promtail:
image: grafana/promtail:2.8.4
profiles: [ "full" ]
volumes:
- /var/log:/var/log
command: -config.file=/etc/promtail/config.yml
networks:
- safe-tier
grafana:
image: grafana/grafana:latest
profiles: [ "full" ]
ports:
- 3000:3000
networks:
- safe-tier
networks:
safe-tier:
volumes:
program-artifacts: