-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
localhost is not working for db host #175
Comments
You would have to edit your /etc/hosts file and add (the following) into it to work.
|
@BrokenGabe - I transferred it to the docker repo, because it's a docker topic, not the codebase itself :-) |
networking inside containers is really a pain .. Why do you want to run at the same node, this doesn't sound right to me. If you use
you can set |
Networking in containers is a pain. ;) |
If you can wait until containers/podman#12003 is fixed, this config would work as well:
because "normally" the hosts file c |
Works the way as recommend ny nupplaphil. |
@ne20002 the root cause seems to be fixed now, so you could try it again without my workaround, jfyi :) |
Bug Description
I'm settign up a friendica instance for private use with Podman on Debian Bullseye. Using 'localhost' as MYSQL_HOST is not working. Using '127.0.0.1' is working.
Steps to Reproduce
The same applies if I don't use MYSQL_HOST in container setup. Now the installation page comes up with empty database field. Using 'localhost' gives 'can't connect to database'. Using 127.0.0.1 is working.
Actual Result:
'localhost' is not working as db host, '127.0.0.1' is working.
Expected Result:
'localhost' should work.
Screenshots
Platform Info
Debian Bullseye, Podman.
Friendica Version:
2021.09 docker image
Installation steps for Podman used:
`
$ podman pod create --name friendica --hostname friendica -p 8012:80
$ podman run -d --name friendica-mariadb
--pod friendica
-e PUID=1001
-e PGID=1001
--mount type=bind,src=/mnt/pods/friendica/db,dst=/var/lib/mysql
--restart=unless-stopped
--env MYSQL_HOST=localhost
--env MYSQL_PORT=3306
--env MYSQL_DATABASE=friendica
--env MYSQL_USER=friendica
--env MYSQL_PASSWORD=xxxxxxx
--env MYSQL_RANDOM_ROOT_PASSWORD=yes
mariadb:latest
$ podman run -d --name friendica-fpm
--pod friendica
--env TZ=Europe/Berlin
-e PUID=1001
-e PGID=1001
--mount type=bind,src=/mnt/pods/friendica/html,dst=/var/www/html
--restart=unless-stopped
--env MYSQL_USER=friendica
--env MYSQL_PASSWORD=xxxxxxx
--env MYSQL_DATABASE=friendica
--env FRIENDICA_ADMIN_MAIL=[email protected]
--env FRIENDICA_SITENAME=friendica.at.home
--env FRIENDICA_TZ='Europe/Zurich'
--env FRIENDICA_URL='https://friendica.at.home'
friendica:fpm
$ podman run -d --name friendica-web
--pod friendica
-e PUID=1001
-e PGID=1001
--restart=unless-stopped
--mount type=bind,src=/mnt/pods/friendica/html,dst=/var/www/html
--mount type=bind,src=/mnt/pods/friendica/nginx/nginx.conf,dst=/etc/nginx/nginx.conf,ro=true
nginx:latest
`
The text was updated successfully, but these errors were encountered: