forked from hotosm/tasking-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
70 lines (63 loc) · 1.59 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
59
60
61
62
63
64
65
66
67
68
69
70
# To use this file, run `docker-compose up`.
version: "3.4"
x-backend-config: &backend
image: hotosm-tasking-manager:backend
env_file: ${ENV_FILE:-tasking-manager.env}
depends_on:
- postgresql
links:
- postgresql
networks:
- tm-web
services:
# Main application
backend:
<<: *backend
container_name: tm-backend
restart: always
labels:
- traefik.http.routers.backend.rule=(Host(`127.0.0.1`) || Host(`localhost`)) && PathPrefix(`/api/`)
- traefik.http.services.backend.loadbalancer.server.port=5000
ports:
- "5000:5000"
migration:
<<: *backend
container_name: tm-migration
restart: on-failure
command: flask db upgrade
frontend:
image: hotosm-tasking-manager:frontend
container_name: tm-frontend
restart: always
networks:
- tm-web
ports:
- "3000:80"
labels:
- traefik.http.routers.frontend.rule=Host(`127.0.0.1`) || Host(`localhost`)
- traefik.http.services.frontend.loadbalancer.server.port=3000
postgresql:
image: postgis/postgis:14-3.3
container_name: tm-postgresql
restart: always
env_file: ${ENV_FILE:-tasking-manager.env}
networks:
- tm-web
volumes:
- ../data/tm-db:/var/lib/postgresql/data
# traefik:
# image: traefik:v2.10
# container_name: tm-traefik
# restart: always
# ports:
# - "880:80"
# volumes:
# - /var/run/docker.sock:/var/run/docker.sock:ro
# command:
# - --entrypoints.web.address=:80
# - --providers.docker=true
# networks:
# - tm-web
networks:
tm-web:
external: false