2023-11-06 10:39:27 +08:00
|
|
|
# {{ ansible_managed }}
|
|
|
|
version: "3"
|
|
|
|
services:
|
|
|
|
gitea:
|
2023-11-10 01:58:47 +08:00
|
|
|
image: gitea/gitea:1.21-nightly-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:
|
2023-11-10 12:35:16 +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:
|
|
|
|
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:
|
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
|
2023-11-10 01:58:47 +08:00
|
|
|
|
|
|
|
# Cron in Gitea Action only works in Nightly for now
|