-
Notifications
You must be signed in to change notification settings - Fork 61
/
docker-compose_build.yml
68 lines (65 loc) · 1.68 KB
/
docker-compose_build.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
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/
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U $${POSTGRES_USER}" ]
interval: 5s
timeout: 5s
retries: 5
backend:
image: 4cat
build:
context: .
dockerfile: docker/Dockerfile
container_name: 4cat_backend
env_file:
- .env
depends_on:
db:
condition: service_healthy
ports:
- ${PUBLIC_API_PORT}:4444
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:
- ${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}