Add gitea config. Extract secrets to sops encrypted file.

This commit is contained in:
v.karaychentsev
2026-02-13 10:18:38 +03:00
parent c9328dbe5c
commit ae4efa868f
3 changed files with 72 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
services:
gitea:
image: gitea/gitea:latest
container_name: gitea
env_file:
- .env
restart: unless-stopped
networks:
- caddy_internal
- gitea_db_net
volumes:
- /srv/rundata/gitea/data:/data
# `authorized_keys` file is shared between the host git user and the container git user
- /home/git/.ssh:/data/git/.ssh
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
ports:
#- "3007:3000"
- "127.0.0.1:2222:22" # SSHing Shim (with authorized_keys)
depends_on:
- gitea_db
gitea_db:
image: postgres:14
container_name: gitea_pg_db
restart: unless-stopped
environment:
- USER_UID=${USER_UID}
- USER_GID=${USER_GID}
- POSTGRES_USER=${GITEA__DATABASE__USER}
- POSTGRES_PASSWORD=${GITEA__DATABASE__PASSWD}
- POSTGRES_DB=${GITEA__DATABASE__NAME}
networks:
- gitea_db_net
volumes:
- /srv/rundata/gitea/postgres:/var/lib/postgresql/data
networks:
caddy_internal:
name: caddy_internal
external: true
gitea_db_net:
internal: true