/
docker-compose-api.yml
57 lines (53 loc) · 1.22 KB
/
docker-compose-api.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
version: '3.4'
services:
fi_admin_api:
container_name: fi-admin-api
restart: unless-stopped
build:
context: .
target: prod
image: ${IMAGE_TAG}
volumes:
- ${LOG_PATH}:/logs
- static_files:/app/static_files
- gunisock:/tmp
env_file:
- ./conf/app-env-api
command: gunicorn --bind unix:/tmp/gunicorn.sock fi-admin.wsgi ${GUNICORN_PARAMS}
networks:
- nginx-proxy
deploy:
resources:
limits:
memory: ${MEMORY_APP_LIMIT}
reservations:
memory: ${MEMORY_APP_RESERVATION}
webserver:
container_name: fi-admin-api-webserver
restart: unless-stopped
image: nginx:1.18-alpine
expose:
- 80
volumes:
- ./conf/nginx/api:/etc/nginx/conf.d
- static_files:/app/static_files
- gunisock:/tmp
depends_on:
- fi_admin_api
environment:
- VIRTUAL_HOST=${VIRTUAL_HOST}
- LETSENCRYPT_HOST=${LETSENCRYPT_HOST}
networks:
- nginx-proxy
deploy:
resources:
limits:
memory: ${MEMORY_WEBSERVER_LIMIT}
reservations:
memory: ${MEMORY_WEBSERVER_RESERVATION}
networks:
nginx-proxy:
external: true
volumes:
static_files:
gunisock: