version: '3.8' services: #gitea (222) gitea: image: gitea/gitea:latest container_name: gitea volumes: - ./gitea:/data - /etc/timezone:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro networks: - development ports: - "222:22" depends_on: - traefik environment: - APP_NAME="gitea" - USER_UID=1000 - USER_GID=1000 - USER=git - RUN_MODE=prod - DOMAIN=git.luke-else.co.uk - SSH_DOMAIN=git.luke-else.co.uk - HTTP_PORT=3000 - ROOT_URL=https://git.luke-else.co.uk - SSH_PORT=222 - SSH_LISTEN_PORT=22 - DB_TYPE=sqlite3 labels: ## Expose Gitea Through Trefik ## - "traefik.enable=true" # <== Enable traefik to proxy this container - "traefik.http.routers.gitea.rule=Host(`git.luke-else.co.uk`) || Host(`www.git.luke-else.co.uk`)" - "traefik.http.routers.gitea.entrypoints=http" - "traefik.http.routers.gitea.middlewares=redirect@file" - "traefik.http.routers.gitea-secured.rule=Host(`git.luke-else.co.uk`) || Host(`www.git.luke-else.co.uk`)" - "traefik.http.routers.gitea-secured.entrypoints=https" - "traefik.http.routers.gitea-secured.tls.certresolver=mytlschallenge" restart: unless-stopped networks: development: external: true