44 lines
1.1 KiB
Django/Jinja
44 lines
1.1 KiB
Django/Jinja
# vi: ft=yaml
|
|
version: "3"
|
|
|
|
networks:
|
|
traefik:
|
|
external: true
|
|
|
|
configs:
|
|
config:
|
|
file: /srv/forgejo/app.ini
|
|
|
|
services:
|
|
server:
|
|
image: codeberg.org/forgejo/forgejo:1.18
|
|
environment:
|
|
- USER_UID=1000
|
|
- USER_GID=1000
|
|
networks:
|
|
- traefik
|
|
ports:
|
|
- "{{ git_ssh_port }}:22"
|
|
volumes:
|
|
- type: bind
|
|
source: /mnt/data/forgejo
|
|
target: /data
|
|
- /etc/timezone:/etc/timezone:ro
|
|
- /etc/localtime:/etc/localtime:ro
|
|
deploy:
|
|
placement:
|
|
constraints:
|
|
- node.role == manager
|
|
labels:
|
|
- traefik.port=443
|
|
- traefik.enable=true
|
|
- traefik.http.routers.forgejo.entrypoints=websecure
|
|
- traefik.http.routers.forgejo.rule=Host(`{{ git_domain }}`)
|
|
- traefik.http.routers.forgejo.tls=true
|
|
- traefik.http.routers.forgejo.tls.certresolver=letsencrypt
|
|
- traefik.http.routers.forgejo.service=forgejo
|
|
- traefik.http.services.forgejo.loadbalancer.server.port=3000
|
|
- traefik.docker.network=traefik
|
|
configs:
|
|
- source: config
|
|
target: /data/gitea/conf/app.ini
|