generated from EPFL-ENAC/enac-it4r-repo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
88 lines (88 loc) · 2.43 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
version: '3.9'
services:
reverse-proxy:
image: traefik:v2.10
command:
- "--accesslog=true"
- "--providers.docker"
- "--providers.file.directory=/configuration/"
- "--entrypoints.web.address=:80"
ports:
- "80:80"
restart: unless-stopped
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
frontend:
build:
context: ./frontend
args:
- API_URL=${API_URL}
- API_PATH=/api
expose:
- 80
ports:
- '8080:80'
labels:
- "traefik.http.routers.frontend.rule=PathPrefix(`/`)"
- "traefik.http.services.frontend.loadbalancer.server.port=80"
- "traefik.http.routers.frontend.middlewares=frontend-middleware"
- "traefik.http.middlewares.frontend-middleware.stripprefix.prefixes=/"
restart: unless-stopped
backend:
build: ./backend
environment:
- DB_HOST=postgres
- DB_PORT=${DB_PORT}
- DB_USER=${DB_USER}
- DB_PASSWORD=${DB_PASSWORD}
- DB_NAME=${DB_NAME}
- DB_PREFIX=${DB_PREFIX}
- API_KEYS=${API_KEYS}
- PATH_PREFIX=/api
- S3_ENDPOINT_HOSTNAME=${S3_ENDPOINT_HOSTNAME}
- S3_ENDPOINT_PROTOCOL=${S3_ENDPOINT_PROTOCOL}
- S3_ACCESS_KEY_ID=${S3_ACCESS_KEY_ID}
- S3_SECRET_ACCESS_KEY=${S3_SECRET_ACCESS_KEY}
- S3_REGION=${S3_REGION}
- S3_BUCKET=${S3_BUCKET}
- S3_PATH_PREFIX=${S3_PATH_PREFIX}
expose:
- 8000
ports:
- '8000:8000'
labels:
- "traefik.http.routers.backend.rule=PathPrefix(`/api`)"
- "traefik.http.services.backend.loadbalancer.server.port=8000"
- "traefik.http.routers.backend.middlewares=backend-middleware"
- "traefik.http.middlewares.backend-middleware.stripprefix.prefixes=/api"
restart: unless-stopped
links:
- postgres
postgres:
image: postgres:15.5-alpine
expose:
- 5432
ports:
- '5432:5432'
restart: always
environment:
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_DB=${DB_NAME}
- POSTGRES_HOST=postgres
pgadmin:
container_name: pgadmin4_mast
image: dpage/pgadmin4
restart: always
environment:
PGADMIN_DEFAULT_EMAIL: enacit4research@epfl.ch
PGADMIN_DEFAULT_PASSWORD: password
ports:
- "5050:5050"
- "5080:80"
- "5443:443"
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
postgres:
driver: local