Files
compose/versioncontrol/compose.yml

46 lines
1.6 KiB
YAML
Raw Normal View History

2025-08-08 15:08:10 -04:00
version: "3.9"
services:
gitea:
image: gitea/gitea:latest
container_name: gitea
environment:
- USER_UID=1000
- USER_GID=1000
- GITEA__server__ROOT_URL=https://code.lazyworkhorse.net
- SSH_PORT=2222
- SSH_LISTEN_PORT=2222
2025-08-08 15:08:10 -04:00
volumes:
- /mnt/HoardingCow_docker_data/Gitea:/data
networks:
- traefik-net
restart: unless-stopped
ports:
- "2222:2222"
2025-08-08 15:08:10 -04:00
labels:
- "traefik.enable=true"
2026-02-22 18:35:22 -05:00
# HTTP -> HTTPS Redirect
2025-08-08 15:08:10 -04:00
- "traefik.http.routers.gitea-http.rule=Host(`code.lazyworkhorse.net`)"
- "traefik.http.routers.gitea-http.entrypoints=web"
- "traefik.http.routers.gitea-http.middlewares=redirect-to-https"
2026-02-22 18:35:22 -05:00
- "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
2025-08-08 15:08:10 -04:00
2026-02-22 18:35:22 -05:00
# HTTPS Router
2025-08-08 15:08:10 -04:00
- "traefik.http.routers.gitea-https.rule=Host(`code.lazyworkhorse.net`)"
- "traefik.http.routers.gitea-https.entrypoints=websecure"
- "traefik.http.routers.gitea-https.tls=true"
- "traefik.http.routers.gitea-https.tls.certresolver=njalla"
2026-02-22 18:35:22 -05:00
- "traefik.http.routers.gitea-https.middlewares=gitea-home-redirect"
2025-08-08 15:08:10 -04:00
2026-02-22 18:35:22 -05:00
# The Redirect Logic - Using single quotes to allow backslashes
- 'traefik.http.middlewares.gitea-home-redirect.redirectregex.regex=^https://code\.lazyworkhorse\.net/?$$'
- 'traefik.http.middlewares.gitea-home-redirect.redirectregex.replacement=https://code.lazyworkhorse.net/gortium'
- "traefik.http.middlewares.gitea-home-redirect.redirectregex.permanent=true"
2025-08-08 15:08:10 -04:00
2026-02-22 18:35:22 -05:00
# Internal Routing
2025-08-08 15:08:10 -04:00
- "traefik.http.services.gitea.loadbalancer.server.port=3000"
networks:
traefik-net:
external: true