From 56c9d08d0c99f3f9e65e4a17c24954f7f11267cb Mon Sep 17 00:00:00 2001 From: Michael Housh Date: Thu, 10 Apr 2025 12:54:19 -0400 Subject: [PATCH] feat: Initial commit. --- compose.yaml | 39 +++++++++++++++++++++++++++++++++++++++ example.env | 15 +++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 compose.yaml create mode 100644 example.env diff --git a/compose.yaml b/compose.yaml new file mode 100644 index 0000000..236a011 --- /dev/null +++ b/compose.yaml @@ -0,0 +1,39 @@ +services: + postgres: + container_name: gitea-postgres + image: docker.io/postgres:16.2-alpine + restart: unless-stopped + env_file: .env + networks: + - backend + volumes: + - /opt/gitea/postgres-data:/var/lib/postgresql/data:z + security_opt: + - no-new-privileges:true + + gitea: + container_name: gitea + image: docker.io/gitea/gitea:1.23 + env_file: .env + restart: unless-stopped + networks: + - backend + - proxy + volumes: + - /home/git/.ssh:/data/git/.ssh # ssh pass-through from host. + - ${DATA_MNT}:/data + ports: + - "3000:3000" + - "2222:22" # ssh port for git:// + depends_on: + - postgres + security_opt: + - no-new-privileges:true + labels: + - "com.centurylinklabs.watchtower.enable=true" + +networks: + proxy: + external: true + backend: + external: true diff --git a/example.env b/example.env new file mode 100644 index 0000000..b48c5d6 --- /dev/null +++ b/example.env @@ -0,0 +1,15 @@ +USER_UID=1001 +USER_GID=1001 + +GITEA__database__DB_TYPE=postgres +GITEA__database__HOST=postgres:5432 +GITEA__database__NAME=gitea +GITEA__database__USER=gitea +GITEA__database__PASSWD=secret +GITEA__server__SSH_PORT=2222 + +POSTGRES_USER=gitea +POSTGRES_DB=gitea +POSTGRES_PASSWORD=secret + +DATA_MNT=/mnt