-
Notifications
You must be signed in to change notification settings - Fork 70
Expand file tree
/
Copy pathdocker-compose_build.yml
More file actions
79 lines (75 loc) · 2.02 KB
/
docker-compose_build.yml
File metadata and controls
79 lines (75 loc) · 2.02 KB
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
services:
db:
container_name: 4cat_db
image: postgres:${POSTGRES_TAG}
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_HOST_AUTH_METHOD=${POSTGRES_HOST_AUTH_METHOD}
volumes:
- ./data/postgres/:/var/lib/postgresql/data/
# - 4cat_db:/var/lib/postgresql/data/
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U $${POSTGRES_USER}" ]
interval: 5s
timeout: 5s
retries: 5
memcached:
image: memcached:${MEMCACHED_TAG:-alpine}
container_name: 4cat_memcached
command: ["-m", "64"]
healthcheck:
test: ["CMD-SHELL", "echo stats | nc localhost 11211 | grep -q uptime"]
interval: 10s
timeout: 5s
retries: 3
backend:
image: 4cat
build:
context: .
dockerfile: docker/Dockerfile
container_name: 4cat_backend
env_file:
- .env
depends_on:
db:
condition: service_healthy
memcached:
condition: service_healthy
volumes:
- ./data/datasets/:/usr/src/app/data/
- ./data/config/:/usr/src/app/config/
- ./data/logs/:/usr/src/app/logs/
# - 4cat_data:/usr/src/app/data/
# - 4cat_config:/usr/src/app/config/
# - 4cat_logs:/usr/src/app/logs/
entrypoint: docker/docker-entrypoint.sh
frontend:
image: 4cat
container_name: 4cat_frontend
env_file:
- .env
depends_on:
- db
- backend
ports:
- ${SERVER_BIND_ADDRESS}:${PUBLIC_PORT}:5000
- ${TELEGRAM_PORT}:443
volumes:
- ./data/datasets/:/usr/src/app/data/
- ./data/config/:/usr/src/app/config/
- ./data/logs/:/usr/src/app/logs/
# - 4cat_data:/usr/src/app/data/
# - 4cat_config:/usr/src/app/config/
# - 4cat_logs:/usr/src/app/logs/
command: ["docker/wait-for-backend.sh"]
volumes:
4cat_db:
name: ${DOCKER_DB_VOL}
4cat_data:
name: ${DOCKER_DATA_VOL}
4cat_config:
name: ${DOCKER_CONFIG_VOL}
4cat_logs:
name: ${DOCKER_LOGS_VOL}