44 lines
1.1 KiB
YAML
44 lines
1.1 KiB
YAML
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
|