forked from hotosm/tasking-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
62 lines (55 loc) · 1.34 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
# 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: backend
restart: always
labels:
- traefik.http.routers.backend.rule=Host(`localhost`) && PathPrefix(`/api/`)
- traefik.http.services.backend.loadbalancer.server.port=5000
migration:
<<: *backend
container_name: migration
restart: on-failure
command: python manage.py db upgrade
frontend:
image: hotosm-tasking-manager:frontend
restart: always
networks:
- tm-web
labels:
- traefik.http.routers.frontend.rule=Host(`localhost`)
- traefik.http.services.frontend.loadbalancer.server.port=80
postgresql:
image: mdillon/postgis:11
container_name: postgresql
restart: always
env_file: ${ENV_FILE:-tasking-manager.env}
networks:
- tm-web
traefik:
image: traefik:v2.3
restart: always
ports:
- "80: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: true