infrastructure/ansible/roles/docker/files/gitea/docker-compose.yml

77 lines
2.3 KiB
YAML
Raw Normal View History

2020-03-08 18:12:12 +00:00
version: "2.3"
2020-02-07 08:57:48 +00:00
services:
gitea:
2020-03-11 21:24:33 +00:00
image: gitea/gitea:1.11.3
2020-02-07 08:57:48 +00:00
container_name: gitea
restart: unless-stopped
environment:
- USER_UID={{ docker_user.id }}
- USER_GID={{ docker_user.id }}
labels:
- "traefik.enable=true"
2020-03-20 22:21:02 +00:00
- "traefik.http.routers.gitea.rule=(Host(`git.theorangeone.net`) || Host(`git.0rng.one`)) && PathPrefix(`/gitea`)"
2020-02-07 08:57:48 +00:00
- "traefik.http.routers.gitea.tls=true"
- "traefik.http.routers.gitea.tls.certresolver=le"
- "traefik.http.services.gitea-gitea.loadbalancer.server.port=3000"
2020-02-17 21:46:50 +00:00
- "traefik.http.middlewares.gitea-strip.stripprefix.prefixes=/gitea"
- "traefik.http.routers.gitea.middlewares=gitea-strip"
2020-02-07 08:57:48 +00:00
ports:
- "{{ wireguard.clients.intersect.ip }}:3022:3022"
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
2020-02-17 21:46:50 +00:00
2020-03-30 21:40:04 +01:00
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
2020-02-17 21:46:50 +00:00
cgit:
image: theorangeone/docker-cgit:latest
container_name: cgit
restart: unless-stopped
environment:
- USER_UID={{ docker_user.id }}
- USER_GID={{ docker_user.id }}
volumes:
- ./repos:/data/git:ro
- ./cgit/cgitrc:/config/cgitrc:ro
- ./cgit/repos.txt:/config/repos.txt:ro
labels:
- "traefik.enable=true"
2020-03-20 22:21:02 +00:00
- "traefik.http.routers.cgit.rule=Host(`git.theorangeone.net`) || Host(`git.0rng.one`)"
2020-02-17 21:46:50 +00:00
- "traefik.http.routers.cgit.tls=true"
- "traefik.http.routers.cgit.tls.certresolver=le"
gitea-cgit-adapter:
image: theorangeone/gitea-cgit-adapter:latest
restart: unless-stopped
2020-03-25 21:27:15 +00:00
command: /app/gitea-cgit-adapter /etc/gitea.ini /etc/cgit-repos.txt --interval 600
2020-02-17 21:46:50 +00:00
depends_on:
- gitea
volumes:
- ./gitea/gitea/conf/app.ini:/etc/gitea.ini:ro
- ./cgit/repos.txt:/etc/cgit-repos.txt