Help deploying it with podman
Hi, I try to deploy WGER with podman. So far, I have created a pod with all the containers, everything seems to work except I get an error message :
So far, I have created a wger.pod quadlet file, then one .container quadlet file per container, all inside the pod created before.
I don't understand where the problem came from, I have check all the logs but don't understand why it doesn't work, I have repered a line though : django.db.utils.OperationalError: [Errno -2] Name or service not known
I think it's related but not sure.
There is A LOT of quadlet files and logs, so I'm not sure what I should upload. Please, feel free to request any infos, I will upload them asap.
Thanks you a lot!
Sounds like it might be an issue with accessing the database... could be folder permissions or SELinux. I got it running with Podman on RHEL 9.6 today using podman compose, with the docker-compose.yml file from https://github.com/wger-project/docker/blob/master/docker-compose.yml.
For my setup, I have the compose file is in /home/podman/wger/, so I just did the following config changes to make it work
- Clone the repo, or just copy in docker-compose.yml from the root, and the config folder
- Create 'media' and 'static' directories in that folder
- chown 1000:1000 for both those directories (per docker compose file instructions)
- Update docker compose to point to that local directory... change static to ./static and media to ./media (lines 19,20,42,43,109)
- Append :z to all the volumes entries to make it work with SELinux. For the nginx read only 'ro' entries, it should be comma z (eg :ro,z)
- Adjust nginx port, if needed. I set mine as "server-ip:server-port:80", where server-ip and server-port is replaced with your server's IP and desired port. IP is only needed if you have multiple IPs.
- Set prod.env "DJANGO_DEBUG=True"... not sure if needed, but helpful to diagnose issues.
- Optional: Adjust timezones in docker compose and prod.env files
- launch with podman compose up -d, and check logs with podman logs
Also check https://wger.readthedocs.io/en/latest/production/docker.html#deployment for common issues. Hopefully that can help you identify if there's anything missing with your setup.
Thanks you a lot, I will check on that and report back. Thanks again for your help, have a nice day!