summaryrefslogtreecommitdiff
path: root/docker-compose.yml
diff options
context:
space:
mode:
authorDaniel Weipert <code@drogueronin.de>2023-09-17 14:34:50 +0200
committerDaniel Weipert <code@drogueronin.de>2023-09-17 14:34:50 +0200
commit00f8fd8a71ad956dda0e90a42f947f1f805585dc (patch)
treec49d959f60cc4a57c34d62c2cab3cfde6046f82e /docker-compose.yml
inital commit
Diffstat (limited to 'docker-compose.yml')
-rw-r--r--docker-compose.yml31
1 files changed, 31 insertions, 0 deletions
diff --git a/docker-compose.yml b/docker-compose.yml
new file mode 100644
index 0000000..28b327b
--- /dev/null
+++ b/docker-compose.yml
@@ -0,0 +1,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}"