-
Notifications
You must be signed in to change notification settings - Fork 54
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
145 lines (145 loc) · 4.01 KB
/
Copy pathdocker-compose.yaml
File metadata and controls
145 lines (145 loc) · 4.01 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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
# compose config on latest release builds
services:
ray-head:
user: "0"
container_name: ray-head
image: icr.io/quantum-public/qiskit-serverless/ray-node:${VERSION:-0.33.0}
entrypoint: [
"ray", "start", "--head", "--port=6379",
"--dashboard-host=0.0.0.0", "--block"
]
environment:
- OTEL_ENABLED=1
- OTEL_EXPORTER_OTLP_HOST=http://jaeger
- OTEL_EXPORTER_OTLP_PORT=4317
- OTEL_EXPORTER_OTLP_INSECURE=1
- QS_OT_RAY_TRACER=1
ports:
- 8265:8265
volumes:
- host-shm:/dev/shm
- program-artifacts:/data
networks:
- safe-tier
postgres:
image: postgres
environment:
POSTGRES_DB: serverlessdb
POSTGRES_USER: serverlessuser
POSTGRES_PASSWORD: serverlesspassword
networks:
- safe-tier
ports:
- 5432:5432
restart:
always
healthcheck:
test: ["CMD-SHELL", "pg_isready -U serverlessuser -d serverlessdb"]
interval: 1s
timeout: 5s
retries: 5
gateway:
container_name: gateway
image: icr.io/quantum-public/qiskit-serverless/gateway:${VERSION:-0.33.0}
command: python manage.py runserver 0.0.0.0:8000
ports:
- 8000:8000
user: "root" # root user is needed to write on volumes
environment:
- DEBUG=0
# Local-only dev secret. With DEBUG=0 the app fails closed without this.
- DJANGO_SECRET_KEY=django-insecure-local-compose-only-change-me
- RAY_HOST=http://ray-head:8265
- RAY_CLUSTER_MODE_LOCAL=true
- DJANGO_SUPERUSER_USERNAME=admin
- DJANGO_SUPERUSER_PASSWORD=123
- DJANGO_SUPERUSER_EMAIL=admin@noemail.com
- SITE_HOST=http://gateway:8000
- SETTINGS_AUTH_MECHANISM=mock_token
- DATABASE_HOST=postgres
- DATABASE_PORT=5432
- DATABASE_NAME=serverlessdb
- DATABASE_USER=serverlessuser
- DATABASE_PASSWORD=serverlesspassword
- OTEL_ENABLED=1
- OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://jaeger:4317
- OTEL_EXPORTER_OTLP_TRACES_INSECURE=1
networks:
- safe-tier
volumes:
- program-artifacts:/usr/src/app/media/
depends_on:
postgres:
condition: service_healthy
scheduler:
user: "root" # root user is needed to write on volumes
container_name: scheduler
image: icr.io/quantum-public/qiskit-serverless/gateway:${VERSION:-0.33.0}
entrypoint: "./entrypoint-scheduler.sh"
environment:
- DEBUG=0
# Local-only dev secret. With DEBUG=0 the app fails closed without this.
- DJANGO_SECRET_KEY=django-insecure-local-compose-only-change-me
- DATABASE_HOST=postgres
- DATABASE_PORT=5432
- DATABASE_NAME=serverlessdb
- DATABASE_USER=serverlessuser
- DATABASE_PASSWORD=serverlesspassword
- RAY_LOCAL_HOST=http://ray-head:8265
- RAY_CLUSTER_MODE_LOCAL=true
- SETTINGS_AUTH_MECHANISM=mock_token
- OTEL_ENABLED=1
- OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://jaeger:4317
- OTEL_EXPORTER_OTLP_TRACES_INSECURE=1
networks:
- safe-tier
volumes:
- program-artifacts:/usr/src/app/media/
depends_on:
postgres:
condition: service_healthy
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:
- host-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
jaeger:
image: jaegertracing/all-in-one:latest
profiles: [ "full" ]
environment:
- COLLECTOR_OTLP_ENABLED=true
ports:
- 16686:16686
- 4317:4317
- 4318:4318
networks:
- safe-tier
networks:
safe-tier:
volumes:
program-artifacts:
host-shm:
host-log: