chore: Make traefik network configurable and fix DB name
Some checks are pending
Deploy Elmeg / deploy (push) Waiting to run
Some checks are pending
Deploy Elmeg / deploy (push) Waiting to run
This commit is contained in:
parent
29c2033bca
commit
c2c48faad8
1 changed files with 8 additions and 8 deletions
|
|
@ -22,7 +22,7 @@ services:
|
|||
retries: 3
|
||||
networks:
|
||||
- elmeg
|
||||
- traefik
|
||||
- ${TRAEFIK_NETWORK:-traefik}
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.elmeg-backend.rule=(Host(`elmeg.runfoo.run`) || Host(`elmeg.xyz`)) && PathPrefix(`/api`)"
|
||||
|
|
@ -33,7 +33,7 @@ services:
|
|||
- "traefik.http.routers.elmeg-backend.middlewares=elmeg-strip"
|
||||
- "traefik.http.routers.elmeg-backend.service=elmeg-backend-svc"
|
||||
- "traefik.http.services.elmeg-backend-svc.loadbalancer.server.port=8000"
|
||||
- "traefik.docker.network=traefik"
|
||||
- "traefik.docker.network=${TRAEFIK_NETWORK:-traefik}"
|
||||
# Direct routes for docs (no strip)
|
||||
- "traefik.http.routers.elmeg-backend-docs.rule=(Host(`elmeg.runfoo.run`) || Host(`elmeg.xyz`)) && PathPrefix(`/docs`, `/openapi.json`)"
|
||||
- "traefik.http.routers.elmeg-backend-docs.entrypoints=websecure"
|
||||
|
|
@ -51,14 +51,14 @@ services:
|
|||
- ./frontend:/app
|
||||
- /app/node_modules
|
||||
environment:
|
||||
- NEXT_PUBLIC_API_URL=https://elmeg.runfoo.run/api
|
||||
- NEXT_PUBLIC_API_URL=/api
|
||||
- INTERNAL_API_URL=http://backend:8000
|
||||
depends_on:
|
||||
- backend
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- elmeg
|
||||
- traefik
|
||||
- ${TRAEFIK_NETWORK:-traefik}
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.elmeg-frontend.rule=(Host(`elmeg.runfoo.run`) || Host(`elmeg.xyz`)) && !PathPrefix(`/api`, `/docs`, `/openapi.json`)"
|
||||
|
|
@ -66,19 +66,19 @@ services:
|
|||
- "traefik.http.routers.elmeg-frontend.tls.certresolver=letsencrypt"
|
||||
- "traefik.http.routers.elmeg-frontend.priority=50"
|
||||
- "traefik.http.services.elmeg-frontend.loadbalancer.server.port=3000"
|
||||
- "traefik.docker.network=traefik"
|
||||
- "traefik.docker.network=${TRAEFIK_NETWORK:-traefik}"
|
||||
|
||||
db:
|
||||
image: postgres:15-alpine
|
||||
environment:
|
||||
- POSTGRES_USER=elmeg
|
||||
- POSTGRES_PASSWORD=elmeg_password
|
||||
- POSTGRES_DB=elmeg_db
|
||||
- POSTGRES_DB=elmeg
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: [ "CMD-SHELL", "pg_isready -U elmeg" ]
|
||||
test: [ "CMD-SHELL", "pg_isready -U elmeg -d elmeg" ]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
|
@ -92,5 +92,5 @@ volumes:
|
|||
|
||||
networks:
|
||||
elmeg:
|
||||
traefik:
|
||||
${TRAEFIK_NETWORK:-traefik}:
|
||||
external: true
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue