-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
77 lines (71 loc) · 1.62 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
version: '3.4'
services:
decs_api_app:
container_name: decs-api-app
restart: unless-stopped
build:
context: .
target: prod
image: ${IMAGE_TAG}
expose:
- 8000
volumes:
- ${LOG_PATH}:/logs
- static_files:/app/static_files
- gunisock:/tmp
depends_on:
- decs_api_elasticsearch
env_file:
- ./conf/app-env
command: gunicorn --bind unix:/tmp/gunicorn.sock decs_api.wsgi ${GUNICORN_PARAMS}
networks:
- nginx-proxy
deploy:
resources:
limits:
memory: ${MEMORY_APP_LIMIT}
reservations:
memory: ${MEMORY_APP_RESERVATION}
decs_api_webserver:
container_name: decs-api-webserver
restart: unless-stopped
image: nginx:1.20-alpine
expose:
- 80
volumes:
- ./conf/nginx:/etc/nginx/conf.d
- static_files:/app/static_files
- gunisock:/tmp
depends_on:
- decs_api_app
environment:
- VIRTUAL_HOST=${VIRTUAL_HOST}
- LETSENCRYPT_HOST=${VIRTUAL_HOST}
networks:
- nginx-proxy
deploy:
resources:
limits:
memory: ${MEMORY_WEBSERVER_LIMIT}
reservations:
memory: ${MEMORY_WEBSERVER_RESERVATION}
decs_api_elasticsearch:
container_name: decs-api-elasticsearch
image: elasticsearch:8.4.3
volumes:
- esdata:/usr/share/elasticsearch/data
ports:
- 9200:9200
- 9300:9300
environment:
- xpack.security.enabled=false
- discovery.type=single-node
networks:
- nginx-proxy
networks:
nginx-proxy:
external: true
volumes:
static_files:
gunisock:
esdata: