36 lines
1.1 KiB
Django/Jinja
36 lines
1.1 KiB
Django/Jinja
version: "3"
|
|
|
|
networks:
|
|
traefik:
|
|
external: true
|
|
|
|
services:
|
|
server:
|
|
image: codeberg.org/forgejo/forgejo:1.18
|
|
container_name: forgejo
|
|
environment:
|
|
- USER_UID=1000
|
|
- USER_GID=1000
|
|
restart: always
|
|
networks:
|
|
- traefik
|
|
ports:
|
|
- "{{ internal_forgejo_port }}:3000"
|
|
volumes:
|
|
- {{ data_dir }}:/data
|
|
- {{ service_dir }}/conf:/data/gitea/conf
|
|
- /etc/timezone:/etc/timezone:ro
|
|
- /etc/localtime:/etc/localtime:ro
|
|
labels:
|
|
- 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.tcp.routers.forgejo-ssh.rule=HostSNI(`*`)
|
|
- traefik.tcp.routers.forgejo-ssh.entrypoints=ssh
|
|
- traefik.tcp.routers.forgejo-ssh.service=forgejo-ssh
|
|
- traefik.tcp.services.forgejo-ssh.loadbalancer.server.port=22
|