58 lines
1.5 KiB
YAML
58 lines
1.5 KiB
YAML
version: "2.3"
|
|
|
|
services:
|
|
gitea:
|
|
image: gitea/gitea:1.12.2
|
|
restart: unless-stopped
|
|
environment:
|
|
- USER_UID={{ docker_user.id }}
|
|
- USER_GID={{ docker_user.id }}
|
|
labels:
|
|
- traefik.enable=true
|
|
- traefik.http.routers.gitea.rule=(Host(`git.theorangeone.net`) || Host(`git.0rng.one`))
|
|
- traefik.http.routers.gitea.tls.certresolver=le
|
|
- traefik.http.services.gitea-gitea.loadbalancer.server.port=3000
|
|
ports:
|
|
- "{{ wireguard.clients.intersect.ip }}:3022:3022"
|
|
depends_on:
|
|
- db
|
|
volumes:
|
|
- ./gitea:/data
|
|
- ./repos:/data/git
|
|
- /etc/timezone:/etc/timezone:ro
|
|
- /etc/localtime:/etc/localtime:ro
|
|
|
|
db:
|
|
image: postgres:12-alpine
|
|
restart: unless-stopped
|
|
volumes:
|
|
- ./postgres:/var/lib/postgresql/data
|
|
environment:
|
|
- POSTGRES_PASSWORD=gitea
|
|
- POSTGRES_USER=gitea
|
|
|
|
db-backups:
|
|
image: prodrigestivill/postgres-backup-local:12-alpine
|
|
restart: unless-stopped
|
|
volumes:
|
|
- /scratch/db-backups:/backups
|
|
depends_on:
|
|
- db
|
|
environment:
|
|
- POSTGRES_HOST=db
|
|
- POSTGRES_PASSWORD=gitea
|
|
- POSTGRES_USER=gitea
|
|
- POSTGRES_DB=gitea
|
|
- BACKUP_KEEP_MONTHS=1
|
|
- BACKUP_KEEP_WEEKS=1
|
|
|
|
git-mirror:
|
|
image: theorangeone/git-mirror:latest
|
|
restart: unless-stopped
|
|
volumes:
|
|
- ./repositories.toml:/app/repositories.toml:ro
|
|
- /scratch/git-mirror:/app/repos
|
|
environment:
|
|
- GITHUB_TOKEN={{ gitea.git_mirror_github_token }}
|
|
depends_on:
|
|
- gitea
|