-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
62 lines (60 loc) ยท 2.28 KB
/
docker-compose.yml
File metadata and controls
62 lines (60 loc) ยท 2.28 KB
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
services:
# Frontend static server (Nginx)
frontend:
build:
context: ./frontend
labels:
- "org.pseudolab.project=devfactory-platform"
container_name: devfactory-frontend
restart: unless-stopped
networks:
- traefik
- internal
labels:
- traefik.enable=true
- traefik.docker.network=traefik
# --- Traefik Router (frontend) ---
- traefik.http.routers.df-platform-web.rule=Host(`${APP_HOST}`)
- traefik.http.routers.df-platform-web.entrypoints=websecure
- traefik.http.routers.df-platform-web.tls=true
- traefik.http.routers.df-platform-web.tls.certresolver=le
- traefik.http.services.df-platform-web.loadbalancer.server.port=80
# HTTP โ HTTPS redirect
- traefik.http.routers.df-platform-web-http.rule=Host(`${APP_HOST}`)
- traefik.http.routers.df-platform-web-http.entrypoints=web
- traefik.http.routers.df-platform-web-http.middlewares=redirect-to-https@file
- traefik.http.routers.df-platform-web-http.service=df-platform-web
# Backend API server
server:
build:
context: ./server
labels:
- "org.pseudolab.project=devfactory-platform"
container_name: devfactory-api
restart: unless-stopped
environment:
- DATABASE_URL=${DATABASE_URL}
- ACCESS_LOGGING_IP_SALT=${ACCESS_LOGGING_IP_SALT}
- PORT=3000
networks:
- traefik
- internal
labels:
- traefik.enable=true
- traefik.docker.network=traefik
# --- Traefik Router (backend) ---
- traefik.http.routers.df-platform-api.rule=Host(`${APP_HOST}`) && PathPrefix(`/api`)
- traefik.http.routers.df-platform-api.entrypoints=websecure
- traefik.http.routers.df-platform-api.tls=true
- traefik.http.routers.df-platform-api.tls.certresolver=le
- traefik.http.services.df-platform-api.loadbalancer.server.port=3000
# HTTP โ HTTPS redirect
- traefik.http.routers.df-platform-api-http.rule=Host(`${APP_HOST}`) && PathPrefix(`/api`)
- traefik.http.routers.df-platform-api-http.entrypoints=web
- traefik.http.routers.df-platform-api-http.middlewares=redirect-to-https@file
- traefik.http.routers.df-platform-api-http.service=df-platform-api
networks:
traefik:
external: true
internal:
driver: bridge