From 5e6f7799b6f88d0447e355f6b58f3dfe72f5c01f Mon Sep 17 00:00:00 2001 From: Dominik Klarkowski Date: Sun, 16 Nov 2025 10:52:03 +0100 Subject: [PATCH] Init gitea docker-compose --- gitea/.env | 2 ++ gitea/docker-compose.yaml | 42 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 gitea/.env create mode 100644 gitea/docker-compose.yaml diff --git a/gitea/.env b/gitea/.env new file mode 100644 index 0000000..459e668 --- /dev/null +++ b/gitea/.env @@ -0,0 +1,2 @@ +GITTEA_VERSION=1.25.1 +POSTGRES_VERSION=14 \ No newline at end of file diff --git a/gitea/docker-compose.yaml b/gitea/docker-compose.yaml new file mode 100644 index 0000000..a9e9cec --- /dev/null +++ b/gitea/docker-compose.yaml @@ -0,0 +1,42 @@ +version: "3" + +networks: + gitea: + external: false + +services: + server: + image: docker.gitea.com/gitea:${GITTEA_VERSION} + container_name: gitea + environment: + - USER_UID=1000 + - USER_GID=1000 + - GITEA__database__DB_TYPE=postgres + - GITEA__database__HOST=gittea-db:5432 + - GITEA__database__NAME=gitea + - GITEA__database__USER=gitea + - GITEA__database__PASSWD=gitea + restart: always + networks: + - gitea + volumes: + - /gitea/server:/data + - /etc/timezone:/etc/timezone:ro + - /etc/localtime:/etc/localtime:ro + ports: + - "1812:3000" + - "222:22" + depends_on: + - gittea-db + + gittea-db: + image: docker.io/library/postgres:${POSTGRES_VERSION} + restart: always + environment: + - POSTGRES_USER=gitea + - POSTGRES_PASSWORD=gitea + - POSTGRES_DB=gitea + networks: + - gitea + volumes: + - /gittea/postgres:/var/lib/postgresql/data \ No newline at end of file