Hello dear community,
I have created a Gitea server via a Docker container on a test instance (VirtualBox) - everything works wonderfully here.
Now I want to do the same on my web server but I get the following error message in the setup:
Database settings are invalid: dial tcp 172.21.0.2:3306: connect: connection timed out
I would like to use the host’s database - on Virtualbox it worked with this IP. Port 3306 + 3300 is free in the FW, the access data to the database is also correct and I have now even allowed the user access from any host - but the error message simply does not change
/etc/gitea# cat docker-compose.yml
version: '3'
networks:
gitea:
external: false
volumes:
gitea:
driver: local
services:
server:
image: gitea/gitea:1.13.6
container_name: gitea
environment:
- DB_TYPE=mysql
- DB_HOST=172.21.0.2
- DB_NAME=DBNAME
- DB_USER=DBUSER
- DB_PASSWD=DBPW
restart: always
networks:
- gitea
volumes:
- /var/www/clients/clientx/weby/private/giteadata/data:/data
- /var/www/clients/clientx/weby/private/giteadata/config:/config
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
- /var/run/mysqld:/var/run/mysqld
ports:
- "3300:3000"
- "222:22"
Since port 3000 is already occupied for Rocketchat, I switched to 3300 - everything works wonderfully on Virtualbox ^^
The Apache conf as follows:
## gitea
<Proxy *>
Order allow,deny
Allow from all
</Proxy>
AllowEncodedSlashes NoDecode
# Note: no trailing slash after either /git or port
ProxyPass /git http://127.0.0.1:3300 nocanon
ProxyPassReverse /git http://127.0.0.1:3300
Whats going on here ? Many thanks in advance