Gitea just returns a 404
SOLUTION (u/mrrichardcranium)
Change
- "traefik.http.
routers.git.loadbalancer.server.port=3000"
to
- "traefik.http.services.git.loadbalancer.server.port=3000"
_____________________________________________________________________________
Since their forum seems to be rather slow in answering I hope someone over here can help me ;)
I'm trying to run Gitea behind a Traefik v2 proxy, but all I get is a 404. My config is
version: '3'
services:
db:
image: mariadb:latest
container_name: git_db
restart: always
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- MYSQL_DATABASE=${MYSQL_GIT_DB}
- MYSQL_USER=${MYSQL_GIT_USER}
- MYSQL_PASSWORD=${MYSQL_GIT_PASSWORD}
volumes:
- ${DOCKERDIR}/git//db/:/var/lib/mysql
networks:
- internal
git:
image: gitea/gitea:latest
volumes:
- /mnt/data-storage/git-repositories:/data/git/repositories
- ${DOCKERDIR}/git/gitea:/data
ports:
# - "3000:3000"
- "2222:22"
depends_on:
- db
restart: always
environment:
- DB_TYPE=mysql
- DB_HOST=git_db
- DB_NAME=${MYSQL_GIT_DB}
- DB_USER=${MYSQL_GIT_USER}
- DB_PASSWD=${MYSQL_GIT_PASSWORD}
- DISABLE_SSH=true
- SSH_DOMAIN=git.${DOMAIN_JS}
labels:
- "traefik.http.routers.git.rule=Host(`git.${DOMAIN_JS}`)"
- "traefik.http.routers.git.tls=true"
- "traefik.http.routers.git.tls.certresolver=le"
- "traefik.http.routers.git.entrypoints=https"
- "traefik.http.routers.git.loadbalancer.server.port=3000"
networks:
- external
- internal
networks:
external:
external: true
internal:
external: false
I'd really love your help, as I need to complete this setup rather sooner than later...
Posted Mar 21, 2020, 11:53 AM UTC · edited
I don't use the traefik reverse proxy but could it be that you have ports 3000:3000 commented out but your label is telling traefik to use 3000?
Also what are the docker logs come out of git?
That shouldn't be a problem. If Traefik works properly, the forwarding port 3000 from the host isn't required since Traefik would proxy it on the internal Docker network that both containers live on. I have commented out port forwards in my docker-compose files as well. I use them at first without Traefik to test the container. Once Traefik works, I comment out the port.
Thanks for the info. I do t use Traefik so I wasn't sure.
Well, that's the sad part, the logs don't say anything...
Also checked the traefik-logs, no info there. Traefik picks up the container event just fine.
What is the traefik access logs say when you try and access git? That should give you more information as to where traefik is trying to get the website, and why it's giving the 404.