I’m trying to host Gitea on docker using docker-compose. I’m able to access Gitea locally, but when trying to access from domain I’m having following error.
kex_exchange_identification: client sent invalid protocol identifier “GET / HTTP/1.1”
send_error: write: Broken pipe
kex_exchange_identification: client sent invalid protocol identifier “GET /favicon.ico HTTP/1.1”
send_error: write: Broken pipe
Docker-compose
version: "2"
services:
gitea:
image: gitea/gitea:latest
environment:
- USER_UID=1000
- USER_GID=1000
- PROTOCOL=https
- DOMAIN=git.DOMAIN.com
- ENABLE_LETSENCRYPT=true
- LETSENCRYPT_ACCEPTTOS=true
- LETSENCRYPT_DIRECTORY=https
- LETSENCRYPT_EMAIL=mail@mail.com
restart: always
labels:
- traefik.enable=true
- traefik.docker.network=web
- traefik.http.routers.gitea.rule=Host(`git.DOMAIN.com`)
- traefik.http.routers.gitea.tls=true
- traefik.http.routers.gitea.tls.certresolver=le
- traefik.http.routers.gitea.entrypoints=websecure
- traefik.http.middlewares.gitea-redirect-web-secure.redirectscheme.scheme=https
- traefik.http.routers.gitea-web.middlewares=gitea-redirect-web-secure
- traefik.http.routers.gitea-web.rule=Host(`git.DOMAIN.com`)
- traefik.http.routers.gitea-web.entrypoints=web
networks:
- web
volumes:
- /data/gitea:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
ports:
- "3000:3000"
- "2222:22"
networks:
web:
external: false
I’m using Traefik 2.0.7. I already had Traefik+Letsencrypt working from docker-compose at GitHub - JoshBlades/ncbuilder: Scripts to automatically build a Nextcloud Docker stack.