From 160b9286c3b31704cd01a5d67d63da454319983a Mon Sep 17 00:00:00 2001 From: Florian Zirker Date: Thu, 23 Feb 2023 11:28:01 +0100 Subject: [PATCH] Gitea -> forgejo --- git/docker-compose.yaml | 59 +++++++++++++++++++++++++++++++++++++++ gitea/docker-compose.yaml | 55 ------------------------------------ 2 files changed, 59 insertions(+), 55 deletions(-) create mode 100644 git/docker-compose.yaml delete mode 100644 gitea/docker-compose.yaml diff --git a/git/docker-compose.yaml b/git/docker-compose.yaml new file mode 100644 index 0000000..2b8d254 --- /dev/null +++ b/git/docker-compose.yaml @@ -0,0 +1,59 @@ +services: + + web: + image: codeberg.org/forgejo/forgejo:1.18 + volumes: + - ${VOLUMES_PATH}/git/forgejo_data:/data + - /etc/timezone:/etc/timezone:ro + - /etc/localtime:/etc/localtime:ro + ports: + - "2222:22" + networks: + - web + - git + labels: + - "traefik.enable=true" + - "traefik.http.routers.forgejo.rule=Host(`gitea.${DOMAIN}`, `git.${DOMAIN}`)" + - "traefik.http.routers.forgejo.entrypoints=websecure" + - "traefik.http.routers.forgejo.tls.certresolver=netcup" + - "traefik.http.routers.forgejo.tls.options=intermediate@file" + - "traefik.http.routers.forgejo.middlewares=gitearedir" + - "traefik.http.middlewares.gitearedir.redirectregex.regex=^https://gitea.${DOMAIN}/(.*)" + - "traefik.http.middlewares.gitearedir.redirectregex.replacement=https://git.${DOMAIN}/$${1}" + - "traefik.http.middlewares.gitearedir.redirectregex.permanent=true" + - "traefik.http.services.forgejo.loadbalancer.server.port=3000" + - "docker.group=git" + depends_on: + - db + restart: unless-stopped + environment: + - USER_UID=1000 + - USER_GID=1000 + - DB_TYPE=mysql + - DB_TYPE=postgres + - DB_HOST=db:5432 + - DB_NAME=${POSTGRES_DB} + - DB_USER=${POSTGRES_USER} + - DB_PASSWD=${POSTGRES_PASSWORD} + + + db: + image: postgres:13 + restart: unless-stopped + environment: + - POSTGRES_USER=${POSTGRES_USER} + - POSTGRES_PASSWORD=${POSTGRES_PASSWORD} + - POSTGRES_DB=${POSTGRES_DB} + networks: + - git + volumes: + - ${VOLUMES_PATH}/git/forgejo_db:/var/lib/postgresql/data + labels: + - "docker.group=git" + + +networks: + git: + web: + external: true + diff --git a/gitea/docker-compose.yaml b/gitea/docker-compose.yaml deleted file mode 100644 index 68b97d8..0000000 --- a/gitea/docker-compose.yaml +++ /dev/null @@ -1,55 +0,0 @@ -services: - - web: - image: gitea/gitea:1 - volumes: - - ${VOLUMES_PATH}/gitea_data:/data - - /etc/timezone:/etc/timezone:ro - - /etc/localtime:/etc/localtime:ro - ports: - - "2222:22" - networks: - - web - - gitea - labels: - - "traefik.enable=true" - - "traefik.http.routers.gitea.rule=Host(`gitea.${DOMAIN}`)" - - "traefik.http.routers.gitea.entrypoints=websecure" - - "traefik.http.routers.gitea.tls.certresolver=netcup" - - "traefik.http.routers.gitea.tls.options=intermediate@file" - - "traefik.http.services.gitea.loadbalancer.server.port=3000" - - "docker.group=gitea" - depends_on: - - db - restart: unless-stopped - environment: - - USER_UID=1000 - - USER_GID=1000 - - DB_TYPE=mysql - - DB_TYPE=postgres - - DB_HOST=db:5432 - - DB_NAME=${POSTGRES_DB} - - DB_USER=${POSTGRES_USER} - - DB_PASSWD=${POSTGRES_PASSWORD} - - - db: - image: postgres:13 - restart: unless-stopped - environment: - - POSTGRES_USER=${POSTGRES_USER} - - POSTGRES_PASSWORD=${POSTGRES_PASSWORD} - - POSTGRES_DB=${POSTGRES_DB} - networks: - - gitea - volumes: - - ${VOLUMES_PATH}/gitea_db:/var/lib/postgresql/data - labels: - - "docker.group=gitea" - - -networks: - gitea: - web: - external: true -