--- services: gitea-server: image: docker.io/gitea/gitea:1.24.5 container_name: gitea-server env_file: - ./.env # contains the GoDaddy API Key and Secret environment: - USER_UID=1000 - USER_GID=1000 - GITEA__database__DB_TYPE=postgres - GITEA__database__HOST=${POSTGRES_HOST:-gitea-postgres}:${POSTGRES_PORT:-5432} - GITEA__database__NAME=${POSTGRES_DB:-gitea} - GITEA__database__USER=${POSTGRES_USER:-gitea} - GITEA__database__PASSWD=${POSTGRES_PASSWORD:?POSTGRES_PASSWORD not set} - GITEA__server__SSH_PORT=2221 # <-- (Optional) Replace with your desired SSH port - GITEA__server__ROOT_URL=https://gitea.harkon.co.uk # <-- Replace with your FQDN networks: - frontend - backend volumes: - gitea-data:/data - /etc/timezone:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro ports: - "2221:22" # <-- (Optional) Replace with your desired SSH port depends_on: - gitea-postgres labels: - traefik.enable=true - traefik.http.services.gitea.loadbalancer.server.port=3000 - traefik.http.services.gitea.loadbalancer.server.scheme=http - traefik.http.routers.gitea-https.entrypoints=websecure - traefik.http.routers.gitea-https.rule=Host(`gitea.harkon.co.uk`) # <-- Replace with your FQDN - traefik.http.routers.gitea-https.tls=true - traefik.http.routers.gitea-https.tls.certresolver=godaddy # <-- Replace with your certresolver - traefik.http.routers.gitea.service=gitea restart: unless-stopped gitea-postgres: image: docker.io/library/postgres:17.5 container_name: gitea-postgres environment: - POSTGRES_USER=${POSTGRES_USER:-gitea} - POSTGRES_PASSWORD=${POSTGRES_PASSWORD:?POSTGRES_PASSWORD not set} - POSTGRES_DB=${POSTGRES_DB:-gitea} networks: - backend volumes: - gitea-db:/var/lib/postgresql/data restart: unless-stopped volumes: gitea-data: driver: local gitea-db: driver: local networks: frontend: external: true backend: external: true