-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.dev.yml
83 lines (79 loc) · 1.87 KB
/
docker-compose.dev.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
version: "3.9"
services:
api:
image: google-sc
build:
context: .
dockerfile: "Dockerfile"
container_name: api
restart: always
depends_on:
- redis
env_file:
- ./env/.env.dev
working_dir: "/app"
command: sh -c "/tmp/api-envsubst-log-ini.sh;python3 api.py"
deploy:
resources:
limits:
cpus: '0.80'
memory: 850M
reservations:
cpus: '0.25'
memory: 450M
volumes:
- ${APP_DIR_HOST}:${APP_DIR_CONT}:ro
- ${LOG_DIR_HOST}:${LOG_DIR_CONT}:rw
- ${LOG_CONF_HOST}:${LOG_CONF_CONT}:ro
# The expose option is only for the debug/development mode.
# Don't add this option in the production server.
ports:
- "${PORT_EXPOSE}:${PORT}"
links:
- "${REDIS_CON_NAME}:${REDIS_SRV_DOMAIN}"
redis:
image: redis:latest
container_name: api_cache
restart: always
deploy:
resources:
limits:
cpus: '0.15'
memory: 150M
reservations:
cpus: '0.10'
memory: 50M
volumes:
- ${REDIS_CONF}:${REDIS_CONF_CON}:ro
# The expose option is only for the debug/development mode.
# Don't add this option in the production server.
ports:
- ${REDIS_PORT}:${REDIS_PORT_CON}
nginx:
image: api_revers_proxy
build:
context: "./configs/nginx/"
dockerfile: "Dockerfile"
container_name: revers_proxy
env_file:
- env/.env.dev
restart: always
depends_on:
- api
deploy:
resources:
limits:
cpus: '0.10'
memory: 50M
reservations:
cpus: '0.08'
memory: 30M
volumes:
- ${NGINX_LOG_DIR_HOST}:${NGINX_LOG_DIR_CONT}:rw
ports:
- "${NGINX_EXPOSE_PORT}:${NGINX_LISTEN_PORT}"
links:
- "${APP_NAME}:${APP_CONT_DOMAIN}"
volumes:
pgdata:
external: true