refactor: move traefik configuration to docker-compose files via labels
This commit is contained in:
+24
-2
@@ -25,11 +25,33 @@ services:
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.docker.network=traefik-proxy"
|
||||
|
||||
# Prod Router
|
||||
- "traefik.http.routers.gitea.rule=Host(`gitea.forust.xyz`)"
|
||||
- "traefik.http.routers.gitea.entrypoints=websecure"
|
||||
- "traefik.http.routers.gitea.middlewares=security-headers"
|
||||
- "traefik.http.routers.gitea.service=gitea"
|
||||
- "traefik.http.routers.gitea.tls=true"
|
||||
- "traefik.http.services.gitea.loadbalancer.server.port=3000"
|
||||
|
||||
# Local Router
|
||||
- "traefik.http.routers.gitea-local.rule=Host(`gitea.workstation.local`) || Host(`gitea.local`)"
|
||||
- "traefik.http.routers.gitea-local.entrypoints=websecure"
|
||||
- "traefik.http.routers.gitea-local.middlewares=security-headers"
|
||||
- "traefik.http.routers.gitea-local.service=gitea"
|
||||
- "traefik.http.routers.gitea-local.tls=true"
|
||||
|
||||
# Dev Router
|
||||
- "traefik.http.routers.gitea-dev.rule=Host(`gitea.gigaforust.local`)"
|
||||
- "traefik.http.routers.gitea-dev.entrypoints=websecure"
|
||||
- "traefik.http.routers.gitea-dev.middlewares=security-headers"
|
||||
- "traefik.http.routers.gitea-dev.service=gitea"
|
||||
- "traefik.http.routers.gitea-dev.tls=true"
|
||||
ports:
|
||||
- "2221:22"
|
||||
depends_on:
|
||||
- db
|
||||
|
||||
|
||||
db:
|
||||
image: docker.io/library/postgres:14
|
||||
restart: always
|
||||
@@ -41,7 +63,7 @@ services:
|
||||
- gitea-db
|
||||
volumes:
|
||||
- ./gitea-db/:/var/lib/postgresql/data
|
||||
|
||||
|
||||
networks:
|
||||
gitea-db:
|
||||
external: false
|
||||
|
||||
Reference in New Issue
Block a user