-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
125 lines (122 loc) · 4.06 KB
/
docker-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
version: "3"
services:
db:
image: "postgres:13.3"
environment:
POSTGRES_DB: "controlpanel"
POSTGRES_PASSWORD: "password"
POSTGRES_USER: "controlpanel"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
redis:
image: "redis"
environment:
REDIS_PASSWORD: "controlpanel"
command: sh -c "exec redis-server --requirepass \"$${REDIS_PASSWORD}\""
migration:
image: ${REGISTRY}/${REPOSITORY}:${IMAGE_TAG:-latest}
depends_on:
db:
condition: service_healthy
environment:
DB_HOST: "db"
DB_NAME: "controlpanel"
DB_PASSWORD: "password"
DB_PORT: 5432
DB_USER: "controlpanel"
DEBUG: "True"
PYTHONUNBUFFERED: "1"
SLACK_API_TOKEN: "dummy"
DJANGO_SETTINGS_MODULE: ${DJANGO_SETTINGS_MODULE}
command: sh -c "./manage.py migrate"
worker:
image: ${REGISTRY}/${REPOSITORY}_eks:${IMAGE_TAG:-latest}
depends_on:
redis:
condition: service_started
db:
condition: service_healthy
volumes:
- ~/.kube/controlpanel:/home/controlpanel/.kube/config:ro
command: ["python3", "manage.py", "runworker", "background_tasks"]
environment:
DB_HOST: "db"
DB_NAME: controlpanel
DB_PASSWORD: password
DB_PORT: 5432
DB_USER: controlpanel
DJANGO_SETTINGS_MODULE: ${DJANGO_SETTINGS_MODULE}
ENV: "dev"
OIDC_DOMAIN: dev-analytics-moj.eu.auth0.com
PYTHONUNBUFFERED: "1"
REDIS_HOST: "redis"
REDIS_PASSWORD: "controlpanel"
SECRET_KEY: "1234567890"
SLACK_API_TOKEN: "dummy"
defaultRegion: eu-west-1
frontend:
# Apologies to future devops. Naming is hard.
image: ${REGISTRY}/${REPOSITORY}_eks:${IMAGE_TAG:-latest}
build:
context: .
# network: ${NETWORK:-default}
dockerfile: Dockerfile
# network_mode: ${NETWORK:-default}
ports: ["8000:8000"]
depends_on:
worker:
condition: service_started
db:
condition: service_healthy
redis:
condition: service_started
links: [worker, db, redis]
volumes:
- ~/.kube/controlpanel:/home/controlpanel/.kube/config
- ~/.aws/credentials:/home/controlpanel/.aws/credentials:ro
# command: ["python3", "manage.py", "runserver", "0.0.0.0:8000"]
environment:
ALLOWED_HOSTS: "localhost 127.0.0.1 0.0.0.0"
AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID}
AWS_DATA_ACCOUNT_ID: ${AWS_DATA_ACCOUNT_ID}
AWS_DEFAULT_REGION:
AWS_REGION: ${AWS_REGION:-eu-west-1}
AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY}
AWS_SESSION_TOKEN: ${AWS_SESSION_TOKEN}
DB_HOST: "db"
DB_NAME: controlpanel
DB_PASSWORD: password
DB_PORT: 5432
DB_USER: controlpanel
DEBUG: "True"
DJANGO_SETTINGS_MODULE: ${DJANGO_SETTINGS_MODULE}
ELASTICSEARCH_HOST: ${ELASTICSEARCH_HOST}
ELASTICSEARCH_PASSWORD: ${ELASTICSEARCH_PASSWORD}
ELASTICSEARCH_USERNAME: ${ELASTICSEARCH_USERNAME}
ENV: "dev"
JUPYTER_LAB_AUTH_CLIENT_ID: ${JUPYTER_LAB_AUTH_CLIENT_ID}
JUPYTER_LAB_AUTH_CLIENT_SECRET: ${JUPYTER_LAB_AUTH_CLIENT_SECRET}
LOGS_BUCKET_NAME: ${LOGS_BUCKET_NAME}
OIDC_AUTH_EXTENSION_URL: ${OIDC_AUTH_EXTENSION_URL}
OIDC_CLIENT_ID: ${OIDC_CLIENT_ID}
OIDC_CLIENT_SECRET: ${OIDC_CLIENT_SECRET}
OIDC_DOMAIN: dev-analytics-moj.eu.auth0.com
OIDC_OP_AUTHORIZATION_ENDPOINT: ${OIDC_OP_AUTHORIZATION_ENDPOINT}
OIDC_OP_JWKS_ENDPOINT: ${OIDC_OP_JWKS_ENDPOINT}
OIDC_OP_TOKEN_ENDPOINT: ${OIDC_OP_TOKEN_ENDPOINT}
OIDC_OP_USER_ENDPOINT: ${OIDC_OP_USER_ENDPOINT}
OIDC_RP_SIGN_ALGO: "RS256"
PYTHONUNBUFFERED: "1"
REDIS_HOST: "redis"
REDIS_PASSWORD: "controlpanel"
RSTUDIO_AUTH_CLIENT_ID: ${RSTUDIO_AUTH_CLIENT_ID}
RSTUDIO_AUTH_CLIENT_SECRET: ${RSTUDIO_AUTH_CLIENT_SECRET}
OIDC_EKS_PROVIDER: ${OIDC_EKS_PROVIDER}
SECRET_KEY: "1234567890"
SLACK_API_TOKEN: "dummy"
SLACK_CHANNEL: ${SLACK_CHANNEL}
TOOLS_DOMAIN: tools.dev.mojanalytics.xyz
ENABLE_DB_SSL: "False"