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

55 lines
1.4 KiB
Plaintext
Raw Normal View History

2023-11-06 10:39:27 +08:00
# {{ ansible_managed }}
services:
gitea:
2024-08-11 20:26:48 +08:00
image: gitea/gitea:1.22.1-rootless
2023-11-06 10:39:27 +08:00
container_name: gitea
security_opt:
- no-new-privileges
environment:
- PUID=1000
- PGID=1000
- USER_UID=1000
- USER_GID=1000
2023-11-09 18:25:07 +08:00
- TZ=Asia/Singapore
2023-11-06 10:39:27 +08:00
- ROOT_URL=https://git.opnxng.com
2023-11-09 18:25:07 +08:00
- 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 }}
2023-11-06 10:39:27 +08:00
volumes:
2023-11-09 18:25:07 +08:00
- {{ docker_dir }}/gitea/data:/var/lib/gitea
- {{ docker_dir }}/gitea/data/config:/etc/gitea
2023-11-06 10:39:27 +08:00
- {{ docker_dir }}/gitea/packages:/packages
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
restart: always
2023-11-09 18:25:07 +08:00
depends_on:
- gitea-db
2023-11-06 10:39:27 +08:00
ports:
2024-08-11 21:41:34 +08:00
- 8885:3000
2023-11-06 10:39:27 +08:00
networks:
2023-11-10 05:28:42 +08:00
- gitea
2023-11-09 18:25:07 +08:00
gitea-db:
2023-12-13 07:36:36 +08:00
image: postgres:16-alpine
2023-11-09 18:25:07 +08:00
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:
2023-12-13 07:36:36 +08:00
- {{ docker_dir }}/gitea/data/dump:/dump
2023-11-09 18:25:07 +08:00
- {{ docker_dir }}/gitea/data/postgres:/var/lib/postgresql/data
restart: always
networks:
2023-11-10 05:28:42 +08:00
- gitea
2023-11-09 18:25:07 +08:00
2023-11-06 10:39:27 +08:00
networks:
2023-11-10 05:28:42 +08:00
gitea:
name: gitea