-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
146 lines (143 loc) · 3.78 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
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
version: '3'
### THIS DOCKER COMPOSE IS FOR PRODUCTION PURPOSES ONLY ###
services:
frontend:
container_name: claim.frontend
entrypoint: ['npm', '--prefix', '/claimasyl', 'run', 'build']
volumes:
- ./frontend/build:/claimasyl/build
build:
context: frontend
backend:
build: ./backend
command: bash /code/docker-entrypoint.sh
volumes:
- ./backend/:/code
- ./keys/private/:/code/privatekeys/
- ./keys/public/:/code/publickeys/
ports:
- "8000:8000"
environment:
- EMAIL_HOST=${EMAIL_HOST}
- EMAIL_HOST_USER=${EMAIL_HOST_USER}
- EMAIL_FROM_MAIL=${EMAIL_FROM_MAIL}
- EMAIL_HOST_PASSWORD=${EMAIL_HOST_PASSWORD}
- EMAIL_PORT=${EMAIL_PORT}
- EMAIL_USE_TLS=${EMAIL_USE_TLS}
- EMAIL_USE_SSL=${EMAIL_USE_SSL}
- CLAIMASYLUM_NOTIFICATION_MAIL=${CLAIMASYLUM_NOTIFICATION_MAIL}
- DJANGO_DEBUG=${DEBUG}
- ALLOWED_HOST=${ALLOWED_HOST}
- GRAYLOG_HOST=${GRAYLOG_HOST}
depends_on:
- graylog
networks:
- claimasylum
- graylog
extra_hosts:
- ${EXTRA_HOSTS}
keys:
build:
context: keys
command: sh /code/docker-entrypoint.sh
volumes:
- ./keys/private:/code/privatekeys
- ./keys/public:/code/publickeys
nginx:
build: nginx
ports:
- 8080:8080
volumes:
- ./nginx/logs:/usr/local/var/log/nginx/
- ./frontend/build:/usr/share/nginx/html
depends_on:
- backend
networks:
- claimasylum
worker:
build:
context: worker
command: python /code/worker.py
volumes:
- ./worker/:/code
- ./keys/private/:/code/privatekeys/
- ./keys/public/:/code/publickeys/
- ./worker/pdfs/:/code/pdfs/
environment:
- EMAIL_HOST=${EMAIL_HOST}
- EMAIL_HOST_USER=${EMAIL_HOST_USER}
- EMAIL_FROM_MAIL=${EMAIL_FROM_MAIL}
- EMAIL_HOST_PASSWORD=${EMAIL_HOST_PASSWORD}
- EMAIL_PORT=${EMAIL_PORT}
- EMAIL_USE_TLS=${EMAIL_USE_TLS}
- EMAIL_USE_SSL=${EMAIL_USE_SSL}
- CLAIMASYLUM_NOTIFICATION_MAIL=${CLAIMASYLUM_NOTIFICATION_MAIL}
networks:
- graylog
mongo:
image: mongo:4.4.6
volumes:
- mongo_data:/data/db
networks:
- graylog
# Elasticsearch: https://www.elastic.co/guide/en/elasticsearch/reference/7.10/docker.html
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch-oss:7.10.2
environment:
- http.host=0.0.0.0
- transport.host=localhost
- network.host=0.0.0.0
- "ES_JAVA_OPTS=-Dlog4j2.formatMsgNoLookups=true -Xms512m -Xmx512m"
volumes:
- es_data:/usr/share/elasticsearch/data
ulimits:
memlock:
soft: -1
hard: -1
deploy:
resources:
limits:
memory: 1g
networks:
- graylog
# Graylog: https://hub.docker.com/r/graylog/graylog/
graylog:
image: graylog/graylog:4.3
environment:
# CHANGE ME (must be at least 16 characters)!
- GRAYLOG_PASSWORD_SECRET=${GRAYLOG_PASSWORD_SECRET}
# Password: admin
- GRAYLOG_ROOT_PASSWORD_SHA2=${GRAYLOG_ROOT_PASSWORD_SHA2}
- GRAYLOG_HTTP_EXTERNAL_URI=http://127.0.0.1:9000/
entrypoint: /usr/bin/tini -- wait-for-it elasticsearch:9200 -- /docker-entrypoint.sh
networks:
- graylog
restart: always
depends_on:
- mongo
- elasticsearch
ports:
# Graylog web interface and REST API
- 9000:9000
# Syslog TCP
- 1514:1514
# Syslog UDP
- 1514:1514/udp
# GELF TCP
- 12201:12201
# GELF UDP
- 12201:12201/udp
volumes:
- graylog_data:/usr/share/graylog/data
networks:
graylog:
driver: bridge
claimasylum:
driver: bridge
volumes:
mongo_data:
driver: local
es_data:
driver: local
graylog_data:
driver: local