From 90544a4d95052481ed2907276f83d2505b13eb71 Mon Sep 17 00:00:00 2001 From: Mircea Eftimescu Date: Wed, 2 Aug 2023 20:22:46 -0400 Subject: [PATCH] added gitea --- gitea/.env-gitea | 5 +++++ gitea/.env-postgres | 4 ++++ gitea/gitea.yml | 42 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 51 insertions(+) create mode 100644 gitea/.env-gitea create mode 100644 gitea/.env-postgres create mode 100644 gitea/gitea.yml diff --git a/gitea/.env-gitea b/gitea/.env-gitea new file mode 100644 index 0000000..b8b564a --- /dev/null +++ b/gitea/.env-gitea @@ -0,0 +1,5 @@ +DB_TYPE=type +DB_HOST=hostname +DB_NAME=name +DB_USER=username +DB_PASSWD=password diff --git a/gitea/.env-postgres b/gitea/.env-postgres new file mode 100644 index 0000000..44ef8fa --- /dev/null +++ b/gitea/.env-postgres @@ -0,0 +1,4 @@ +POSTGRES_USER=username +POSTGRES_PASSWORD=password +POSTGRES_DB=database +POSTGRES_HOST=host diff --git a/gitea/gitea.yml b/gitea/gitea.yml new file mode 100644 index 0000000..474c846 --- /dev/null +++ b/gitea/gitea.yml @@ -0,0 +1,42 @@ +version: '3' + +services: + postgres: + image: postgres + container_name: postgres + volumes: + - db:/var/lib/postgresql/data + env_file: + - .env-postgres + networks: + - backend + restart: unless-stopped + + gitea: + image: gitea/gitea + container_name: gitea + env_file: + - .env-gitea + depends_on: + - postgres + volumes: + - git:/data + labels: + - "traefik.enable=true" + - "traefik.http.routers.gitea-websecure.entrypoints=websecure" + - "traefik.http.routers.gitea-websecure.rule=Host(`gitea.meftimes.com`)" + - "traefik.http.services.gitea-websecure.loadbalancer.server.port=3000" + networks: + - backend + - proxy + restart: unless-stopped + +volumes: + git: + db: + +networks: + proxy: + external: true + backend: + external: true