version: "3.8" services: gitea: image: gitea/gitea:latest container_name: gitea restart: unless-stopped security_opt: - apparmor=unconfined - seccomp=unconfined environment: - USER_UID=1000 - USER_GID=1000 - GITEA__database__DB_TYPE=sqlite3 - GITEA__server__ROOT_URL=https://eckardt-vault.duckdns.org/git/ - GITEA__server__SSH_DOMAIN=192.168.178.111 - GITEA__server__SSH_PORT=2222 - GITEA__server__LFS_START_SERVER=true - GITEA__repository__DEFAULT_BRANCH=main volumes: - /opt/docker/gitea:/data - /etc/timezone:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro ports: - "3000:3000" # Web UI - "2222:22" # Git SSH healthcheck: test: ["CMD", "curl", "-f", "http://localhost:3000/api/healthz"] interval: 30s timeout: 10s retries: 3 deploy: resources: limits: cpus: '2.0' memory: 1G logging: driver: "json-file" options: max-size: "10m" max-file: "3" networks: - gitea-net networks: gitea-net: driver: bridge