services: gitea: image: gitea/gitea:latest container_name: gitea restart: always environment: - ROOT_URL=${IPV4_ADDRESS}:3000/ ports: # - "2222:22" # <-- SSH access is disabled for initial setup, uncomment if needed - "3000:3000" # Uncomment if you want to expose Gitea web interface directly (needed if not rooted behind a reverse proxy or for initial setup) volumes: # Persistent storage for Gitea data, configuration, repositories, etc. # Maps a named volume 'gitea_data' to the container's /data directory. - ./data:/data - /etc/timezone:/etc/timezone:ro # <--- Timezone settings - /etc/localtime:/etc/localtime:ro # <--- Timezone settings - ./data/git:/data/host_repos:ro # <--- Mount for Git repositories - ./logs/:/data/gitea/log/:rw # <--- Mount for Gitea logs (neccessary for debugging and fail2ban) healthcheck: test: ["CMD", "curl", "-f", "http://localhost:3000/"] interval: 1m30s timeout: 10s retries: 3