0
0
opnxng-deploy-playbook/templates/compose/gitea.yaml.j2

55 lines
1.4 KiB
Django/Jinja

# {{ ansible_managed }}
services:
gitea:
image: gitea/gitea:1.22.1-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:16-alpine
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/dump:/dump
- {{ docker_dir }}/gitea/data/postgres:/var/lib/postgresql/data
restart: always
networks:
- gitea
networks:
gitea:
name: gitea