-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathcompose.yaml
124 lines (113 loc) · 3.44 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
services:
backend:
image: ${DOCKER_IMAGE_DASHBOARD:-${DOCKER_REGISTRY:-internetstandards}/dashboard:${RELEASE:-latest}}
build: .
command: dashboard_prdserver --migrate
# TODO: check if needed: --security-opt seccomp=unconfined
environment:
SECRET_KEY_FILE: /etc/django_keys/secret_key
FIELD_ENCRYPTION_KEY_FILE: /etc/django_keys/field_encryption_key
ALLOWED_HOSTS: "*"
UWSGI_HARAKIRI: 3600
DJANGO_DATABASE: production
DB_ENGINE: postgresql_psycopg2
DB_HOST: database
WORKER_ROLE: default
BROKER: redis://broker:6379/0
SENTRY_DSN:
DASHBOARD_FRONTEND_URL:
networks:
dashboard:
volumes:
- dashboard-frontend-uploads:/source/dashboard/uploads
- django-keys:/etc/django_keys/
healthcheck:
interval: 60s
frontend:
image: ${DOCKER_IMAGE_DASHBOARD_STATIC:-${DOCKER_REGISTRY:-internetstandards}/dashboard-static:${RELEASE:-latest}}
build: https://github.com/internetstandards/Internet.nl-dashboard-frontend.git
networks:
dashboard:
healthcheck:
interval: 60s
volumes:
- dashboard-frontend-uploads:/source/dashboard/uploads
worker: &worker
image: ${DOCKER_IMAGE_DASHBOARD:-${DOCKER_REGISTRY:-internetstandards}/dashboard:${RELEASE:-latest}}
build: .
command: celery_dashboard worker --queues storage,celery,isolated,kickoff,kickoff1,kickoff2,kickoff3,kickoff4,database_deprecate,database_deprecate3,database,database3
environment: &worker-environment
SECRET_KEY_FILE: /etc/django_keys/secret_key
FIELD_ENCRYPTION_KEY_FILE: /etc/django_keys/field_encryption_key
DJANGO_DATABASE: production
DB_ENGINE: postgresql_psycopg2
DB_HOST: database
WORKER_ROLE: default_ipv4
BROKER: redis://broker:6379/0
SENTRY_DSN:
networks:
dashboard:
healthcheck:
interval: 60s
volumes:
- django-keys:/etc/django_keys/
- dashboard-frontend-uploads:/source/dashboard/uploads
worker-reporting:
<<: *worker
command: celery_dashboard worker --queues reporting
environment:
<<: *worker-environment
WORKER_ROLE: reporting
worker-scanning:
<<: *worker
command: celery_dashboard worker --queues ipv4,internet
environment:
<<: *worker-environment
WORKER_ROLE: default_ipv4
scheduler:
<<: *worker
image: ${DOCKER_IMAGE_DASHBOARD:-${DOCKER_REGISTRY:-internetstandards}/dashboard:${RELEASE:-latest}}
build: .
command: celery_dashboard beat -l info --pidfile=/var/tmp/celerybeat.pid
webserver:
image: caddy
configs:
- source: caddyfile
target: /etc/caddy/Caddyfile
ports:
- 127.0.0.1:8000:8000
networks:
dashboard:
database:
image: postgres:12
environment:
POSTGRES_DB: dashboard
POSTGRES_USER: dashboard
POSTGRES_PASSWORD: dashboard
networks:
dashboard:
volumes:
- database:/var/lib/postgresql/data
healthcheck:
interval: 60s
stop_grace_period: 60s
broker:
image: redis
healthcheck:
interval: 60s
networks:
dashboard:
configs:
caddyfile:
content: |
:8000 {
@paths path /account/* /admin/* /data/* /jet/* /logout/* /mail/* /session/* /static/* /upload/* /security.txt /.well-known/security.txt
reverse_proxy @paths backend:8000
reverse_proxy /* frontend:80
}
volumes:
dashboard-frontend-uploads:
database:
django-keys:
networks:
dashboard: