-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
75 lines (68 loc) · 1.95 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
volumes:
db-data:
runtime-data:
static-data:
networks:
public:
private:
secrets:
postgres_password_secret:
file: ./backend/runtime/secrets/postgres_password_secret
services:
cloudsql-proxy:
image: gcr.io/cloudsql-docker/gce-proxy:latest
command: /cloud_sql_proxy --dir=/cloudsql -instances=kernelci-production:us-central1:postgresql2=tcp:0.0.0.0:5432 -credential_file=/secrets/cloudsql/application_default_credentials.json
ports:
- 5432:5432
volumes:
- ./application_default_credentials.json:/secrets/cloudsql/application_default_credentials.json
networks:
- private
restart: always
backend:
build: ./backend
restart: always
networks:
- private
- public
ports:
- target: 8000
published: 8000
protocol: tcp
mode: host
depends_on:
- cloudsql-proxy
secrets:
- postgres_password_secret
environment:
- 'ALLOWED_HOSTS=["backend", "localhost"]'
- DB_DEFAULT_PASSWORD_FILE=/run/secrets/postgres_password_secret
- DB_DEFAULT_HOST=cloudsql-proxy
- DB_DEFAULT_USER=${DB_DEFAULT_USER:-kernelci}
dashboard:
build: ./dashboard
image: dashboard:latest
collect_static:
build: './collect_static'
image: collect_static:latest
depends_on:
- dashboard
volumes:
- static-data:/data/static
proxy:
build: ./proxy
restart: always
depends_on:
- backend
- collect_static
networks:
- public
volumes:
- static-data:/data/static
ports:
- target: 80
published: 80
protocol: tcp
mode: host
environment:
- PROXY_TARGET=http://backend:8000