0
0
opnxng-deploy-playbook/templates/compose/gitea.yaml.j2
2024-06-06 23:52:16 +08:00

57 lines
1.5 KiB
Django/Jinja

# {{ ansible_managed }}
version: "3"
services:
gitea:
image: gitea/gitea:1.21-nightly-rootless
container_name: gitea
security_opt:
- no-new-privileges
environment:
- PUID=1000
- PGID=1000
- USER_UID=1000
- USER_GID=1000
- TZ=Asia/Singapore
- ROOT_URL=https://git.opnxng.com
- GITEA_DATABASE_DB_TYPE=postgres
- GITEA_DATABASE_HOST=gitea-db:5432
- GITEA_DATABASE_NAME={{ gitea_database_name }}
- GITEA_DATABASE_USER={{ gitea_database_user }}
- GITEA_DATABASE_PASSWD={{ gitea_database_passwd }}
volumes:
- {{ docker_dir }}/gitea/data:/var/lib/gitea
- {{ docker_dir }}/gitea/data/config:/etc/gitea
- {{ docker_dir }}/gitea/packages:/packages
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
restart: always
depends_on:
- gitea-db
ports:
- "8885:3000"
networks:
- gitea
gitea-db:
image: postgres:14
container_name: gitea-db
security_opt:
- no-new-privileges
environment:
- PUID=1000
- PGID=1000
- TZ=Asia/Singapore
- POSTGRES_USER={{ gitea_database_user }}
- POSTGRES_PASSWORD={{ gitea_database_passwd }}
- POSTGRES_DB={{ gitea_database_name }}
volumes:
- {{ docker_dir }}/gitea/data/postgres:/var/lib/postgresql/data
restart: always
networks:
- gitea
networks:
gitea:
name: gitea
# Cron in Gitea Action only works in Nightly for now