refactor: migrate from nginx to traefik labels
This commit is contained in:
parent
11b2c45e36
commit
7e8eaf33f2
1 changed files with 15 additions and 0 deletions
|
|
@ -66,6 +66,7 @@ services:
|
|||
condition: service_healthy
|
||||
networks:
|
||||
- mtad-network-gemini
|
||||
- traefik
|
||||
volumes:
|
||||
- ./app:/app/app:ro
|
||||
healthcheck:
|
||||
|
|
@ -74,6 +75,12 @@ services:
|
|||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 10s
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.mtad-api.rule=Host(`mtd.runfoo.run`) && (PathPrefix(`/api`) || PathPrefix(`/docs`) || PathPrefix(`/redoc`) || PathPrefix(`/openapi.json`))"
|
||||
- "traefik.http.routers.mtad-api.entrypoints=websecure"
|
||||
- "traefik.http.routers.mtad-api.tls.certresolver=myresolver"
|
||||
- "traefik.http.services.mtad-api.loadbalancer.server.port=8000"
|
||||
|
||||
frontend:
|
||||
build:
|
||||
|
|
@ -87,10 +94,16 @@ services:
|
|||
- "3000"
|
||||
networks:
|
||||
- mtad-network-gemini
|
||||
- traefik
|
||||
depends_on:
|
||||
- api
|
||||
environment:
|
||||
NEXT_PUBLIC_API_BASE_URL: https://mtd.runfoo.run/api/v1
|
||||
labels:
|
||||
- "traefik.http.routers.mtad-frontend.rule=Host(`mtd.runfoo.run`)"
|
||||
- "traefik.http.routers.mtad-frontend.entrypoints=websecure"
|
||||
- "traefik.http.routers.mtad-frontend.tls.certresolver=myresolver"
|
||||
- "traefik.http.services.mtad-frontend.loadbalancer.server.port=3000"
|
||||
|
||||
nginx:
|
||||
image: nginx:alpine
|
||||
|
|
@ -118,6 +131,8 @@ services:
|
|||
networks:
|
||||
mtad-network-gemini:
|
||||
driver: bridge
|
||||
traefik:
|
||||
external: true
|
||||
|
||||
volumes:
|
||||
postgres_data_gemini:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue