I am trying to install Gitea with Postgres on a Synology NAS and I am using the exact docker-compose file as described on Gitea install page.
version: "2" networks: gitea: external: false services: server: image: gitea/gitea:latest environment: - USER_UID=1000 - USER_GID=1000 - DB_TYPE=postgres - DB_HOST=db:5432 - DB_NAME=gitea - DB_USER=gitea - DB_PASSWD=gitea restart: always networks: - gitea volumes: - ./gitea:/data ports: - "3000:3000" - "222:22" depends_on: - db db: image: postgres:9.6 restart: always environment: - POSTGRES_USER=gitea - POSTGRES_PASSWORD=gitea - POSTGRES_DB=gitea networks: - gitea volumes: - ./postgres:/var/lib/postgresql/data ports: - "5433:5432"
The only thing I have added to the compose file is a port in the db container to enable access from a external pgadmin.
The docker containers run but then after connecting the gitea webserver and pressing install the gitea container cannot access the db and timeouts. I then changed the
db host parameter on gitea install web page to <synology_ip>.5433, connecting from outside the
gitea network created by the docker compose file. It then works.
I replicated the setup on docker on windows and it works fine without any change in the compose file suggested in the install section of gitea.
As anyone an idea of why the gitea_server container cannot acess the gitea_db container usign the network gitea_gitea created with the docker-compose file.