blob: 28b327b9ebf09a439b6fcc23dc81b356be9d3d30 (
plain)
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
|
version: "3.7"
services:
cgit:
build:
context: "docker/cgit"
dockerfile: "Dockerfile"
env_file: .env
volumes:
- "${REPOSITORIES_PATH}:${CGIT_SCAN_PATH}"
networks:
- traefik
labels:
- "traefik.enable=true"
- "traefik.http.routers.cgit.rule=Host(`${DOMAIN}`) && PathPrefix(`/cgit`)"
- "traefik.http.routers.cgit.entrypoints=websecure"
- "traefik.http.routers.cgit.tls=true"
- "traefik.http.routers.cgit.tls.certresolver=letsencrypt"
- "traefik.http.routers.cgit-root.rule=Host(`${DOMAIN}`)"
- "traefik.http.routers.cgit-root.entrypoints=websecure"
- "traefik.http.routers.cgit-root.tls=true"
- "traefik.http.routers.cgit-root.tls.certresolver=letsencrypt"
- "traefik.http.middlewares.cgit-root.redirectregex.regex=${DOMAIN}/(.*)"
- "traefik.http.middlewares.cgit-root.redirectregex.replacement=${DOMAIN}/cgit/$${1}"
- "traefik.http.routers.cgit-root.middlewares=cgit-root"
networks:
traefik:
external: true
name: "${TRAEFIK_NETWORK}"
|