-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
122 lines (116 loc) · 2.97 KB
/
docker-compose.yaml
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
version: '3.8'
services:
postgres:
container_name: postgres
restart: always
build:
context: ./postgres
env_file:
- .env.${COMPOSE_PROFILES:-development}.local
environment:
- CATASTRO_DATA=${CATASTRO_DATA:-./data}
healthcheck:
test: [ "CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER} || exit 1" ]
volumes:
- ${CATASTRO_DATA:-./data}/postgres:/var/lib/postgresql/data
ports:
- "5432:5432"
updater:
container_name: updater
restart: always
depends_on:
uploader:
condition: service_healthy
build:
context: ./updater
env_file:
- .env.${COMPOSE_PROFILES:-development}.local
volumes:
- ${CATASTRO_DATA:-./data}/update:/catastro
command: ["python3", "-u", "/app/update.py"]
labels:
traefik.enable: "false"
uploader:
container_name: uploader
restart: always
depends_on:
postgres:
condition: service_healthy
build:
context: ./backend
env_file:
- .env.${COMPOSE_PROFILES:-development}.local
environment:
- FLASK_APP=app:create_uploader()
- FLASK_RUN_HOST=0.0.0.0
- FLASK_RUN_PORT=5001
healthcheck:
test: curl --fail http://localhost:5001/ || exit 1
ports:
- 5001:5001
command: ["./run_uploader.sh"]
volumes:
- ${CATASTRO_DATA:-./data}:/data
labels:
traefik.enable: "false"
backend:
container_name: backend
restart: always
depends_on:
postgres:
condition: service_healthy
build:
context: ./backend
env_file:
- .env.${COMPOSE_PROFILES:-development}.local
environment:
- FLASK_APP=app:create_app()
- FLASK_RUN_HOST=0.0.0.0
- FLASK_RUN_PORT=5000
ports:
- 5000:5000
volumes:
- ${CATASTRO_DATA:-./data}:/data
command: ["./run.sh"]
labels:
- traefik.http.routers.backend.rule=PathPrefix(`/api`)
- traefik.http.services.backend.loadbalancer.server.port=5000
frontend:
container_name: frontend
profiles:
- production
depends_on:
- backend
restart: always
build: ./frontend
ports:
- 3000:3000
labels:
- traefik.http.routers.frontend.rule=PathPrefix(`/`)
- traefik.http.services.frontend.loadbalancer.server.port=3000
dozzle:
container_name: dozzle
image: amir20/dozzle:v4.10.4
environment:
- DOZZLE_BASE=/logs
- DOZZLE_NO_ANALYTICS=true
env_file:
- .env.${COMPOSE_PROFILES:-development}.local
volumes:
- /var/run/docker.sock:/var/run/docker.sock
ports:
- 9999:8080
labels:
- traefik.http.routers.dozzle.rule=PathPrefix(`/logs`)
- traefik.http.services.dozzle.loadbalancer.server.port=8080
traefik:
container_name: traefik
image: traefik:v3.0
restart: always
ports:
- 80:80
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
command:
- --entrypoints.web.address=:80
- --providers.docker=true