-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
58 lines (50 loc) · 1.06 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
version: '3.5'
name: 'linebot'
# Modify carefully
x-image-info: &image-info
build:
context: .
dockerfile: Dockerfile
image: "${APP_IMAGE}"
# Modify carefully
x-app-info: &app-info
networks:
- proxy
tty: true
restart: always
init: true
logging:
options:
max-size: 50m
max-file: '10'
services:
app:
<<: *image-info
<<: *app-info
container_name: "${APP_NAME}"
ports:
- "${APP_EXPOSE_PORT:?}:5000"
volumes:
- "./src:/app"
env_file: .env
command: 'gunicorn -c wsgi.py main:app'
tty: false
depends_on:
redis:
condition: service_healthy
redis:
<<: *app-info
image: "${RS_IMAGE}"
container_name: "${APP_NAME}-redis"
volumes:
- "${CONF_PATH}/redis/redis.conf:/usr/local/etc/redis/redis.conf"
- "${DB_PATH}/redis:/data"
healthcheck:
test: ["CMD-SHELL", "redis-cli ping"]
interval: 5s
timeout: 5s
retries: 10
command: [ "redis-server", "/usr/local/etc/redis/redis.conf" ]
networks:
proxy:
name: "${APP_NETWORK}"