homeserver/forgejo/docker-compose.yml
2026-06-27 20:35:49 +02:00

45 lines
1.1 KiB
YAML

name: ${CONTAINER_NAME}
networks:
forgejo:
external: false
traefik:
external: true
services:
server:
image: codeberg.org/forgejo/forgejo:9.0
container_name: ${CONTAINER_NAME}
restart: ${RESTART_POLICY}
environment:
- USER_UID=1000
- USER_GID=1000
networks:
- forgejo
- traefik
volumes:
- type: bind
source: ${DATA_PATH}
target: /data
bind:
create_host_path: true
- type: bind
source: /etc/localtime
target: /etc/localtime
read_only: true
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
ports:
- '222:22'
labels:
- "traefik.enable=true"
- "traefik.http.routers.${ROUTER_NAME}.entrypoints=websecure"
- "traefik.http.routers.${ROUTER_NAME}.rule=Host(`${SUBDOMAIN}.${DOMAIN}`)"
- "traefik.http.routers.${ROUTER_NAME}.tls=true"
- "traefik.http.routers.${ROUTER_NAME}.tls.certresolver=${CERTIFICATE_RESOLVER}"
- "traefik.http.services.${ROUTER_NAME}.loadbalancer.server.port=${CONTAINER_PORT}"
- "traefik.docker.network=${TRAEFIK_NETWORK}"