2023-05-02 12:25:54 +00:00
|
|
|
# vi: ft=yaml
|
|
|
|
version: "3"
|
|
|
|
|
|
|
|
networks:
|
|
|
|
traefik:
|
|
|
|
external: true
|
|
|
|
|
|
|
|
configs:
|
|
|
|
config:
|
2023-05-20 11:45:25 +00:00
|
|
|
external: true
|
|
|
|
name: "{{ config.config_name }}"
|
2023-05-02 12:25:54 +00:00
|
|
|
|
2023-07-05 21:17:44 +00:00
|
|
|
volumes:
|
|
|
|
forgejo:
|
|
|
|
driver_opts:
|
|
|
|
type: "nfs"
|
|
|
|
o: "addr=192.168.30.10,nolock,soft,rw"
|
|
|
|
device: ":/mnt/data/forgejo"
|
|
|
|
|
2023-05-02 12:25:54 +00:00
|
|
|
services:
|
2023-08-20 15:18:49 +00:00
|
|
|
forgejo:
|
2023-08-22 20:50:27 +00:00
|
|
|
image: codeberg.org/forgejo/forgejo:1.20
|
2023-05-02 12:25:54 +00:00
|
|
|
environment:
|
|
|
|
- USER_UID=1000
|
|
|
|
- USER_GID=1000
|
|
|
|
networks:
|
|
|
|
- traefik
|
|
|
|
ports:
|
|
|
|
- "{{ git_ssh_port }}:22"
|
|
|
|
volumes:
|
2023-07-05 21:17:44 +00:00
|
|
|
- type: volume
|
|
|
|
source: forgejo
|
2023-05-02 12:25:54 +00:00
|
|
|
target: /data
|
2023-07-05 21:17:44 +00:00
|
|
|
volume:
|
|
|
|
nocopy: true
|
2023-05-02 12:25:54 +00:00
|
|
|
- /etc/timezone:/etc/timezone:ro
|
|
|
|
- /etc/localtime:/etc/localtime:ro
|
|
|
|
deploy:
|
|
|
|
placement:
|
|
|
|
constraints:
|
2023-05-04 10:29:29 +00:00
|
|
|
- node.role == manager
|
2023-05-02 12:25:54 +00:00
|
|
|
labels:
|
2023-05-02 12:46:04 +00:00
|
|
|
- traefik.port=443
|
2023-05-02 12:25:54 +00:00
|
|
|
- traefik.enable=true
|
2023-05-02 12:46:04 +00:00
|
|
|
- traefik.http.routers.forgejo.entrypoints=websecure
|
2023-05-02 12:25:54 +00:00
|
|
|
- traefik.http.routers.forgejo.rule=Host(`{{ git_domain }}`)
|
2023-05-02 12:46:04 +00:00
|
|
|
- traefik.http.routers.forgejo.tls=true
|
|
|
|
- traefik.http.routers.forgejo.tls.certresolver=letsencrypt
|
2023-05-02 12:25:54 +00:00
|
|
|
- traefik.http.routers.forgejo.service=forgejo
|
|
|
|
- traefik.http.services.forgejo.loadbalancer.server.port=3000
|
|
|
|
- traefik.docker.network=traefik
|
2023-08-23 16:05:07 +00:00
|
|
|
- traefik.http.middlewares.set-forwarded-for.headers.hostsProxyHeaders=X-Forwarded-For
|
|
|
|
- traefik.http.routers.forgejo.middlewares=set-forwarded-for
|
2023-05-02 12:25:54 +00:00
|
|
|
configs:
|
|
|
|
- source: config
|
|
|
|
target: /data/gitea/conf/app.ini
|