Closed ctag closed 3 weeks ago
hi!
web-1 | Applying sites.0001_initial...[32;1m OK[0m
web-1 | Applying sites.0002_alter_domain_unique...[32;1m OK[0m
web-1 | Applying weight.0001_initial...[32;1m OK[0m
web-1 | Applying weight.0002_auto_20150604_2139...[32;1m OK[0m
web-1 | Applying weight.0003_auto_20160416_1030...[32;1m OK[0m
web-1 | Installed 1 object(s) from 1 fixture(s)
web-1 | Installed 24 object(s) from 1 fixture(s)
web-1 | Installed 6 object(s) from 1 fixture(s)
web-1 | Installed 3 object(s) from 1 fixture(s)
web-1 | Installed 5 object(s) from 1 fixture(s)
web-1 | Installed 7 object(s) from 1 fixture(s)
web-1 | Installed 7 object(s) from 1 fixture(s)
web-1 | Installed 6 object(s) from 1 fixture(s)
while that looks alright to me and it seems the database is being correctly migrated and the initial data imported, I don't really like the errors coming from File "/home/wger/.local/lib/python3.12/site-packages/django/db/backends/sqlite3/base.py
and not the postgres backend. Did you change something in the config?
Thank you for taking a look at this.
I did shoehorn the project into my existing caddy setup, but I don't believe any of those changes should break things (or, at least, only break static files). Files attached, I will rotate the passwords and reset but wanted them left alone in case it's a length/match issue.
I thought I had it figured out last night. In the flurry of replacing passwords with generated ones POSTGRES_PASSWORD
and DJANGO_DB_PASSWORD
were set to different values, but I saw DJANGO_DB_HOST
and realized DJANGO is probably a db client so it needs the same password. Set them to match, took all the containers down, deleted the volumes, brought it back up and still no dice. The wger database is empty and the "no such table" entries are still made.
Compose file: compose.txt Env: env.txt
aha, I think I got it! It seems you removed the env_file: - ./config/prod.env
from the compose file. While there are sensible defaults if the env variables are not set, if DJANGO_DB_ENGINE
is not set, we default to using a local sqlite db
https://github.com/wger-project/wger/blob/master/extras/docker/production/settings.py#L21
(If you are setting the env variables somewhere else, they should be picked up, though, you don't need to pass them like that)
Sorry, I forgot that part. I moved prod.env to be ./.env so that it would be configurable through dockge. The containers should still receive the environment variables automatically, I think.
Edit. I'm wrong with that screenshot. Those environment variables are coming from environment:
in the compose file. I was sure .env
was the default file name for that.
Edit 2. OK, I see where I went wrong: https://stackoverflow.com/a/72368718. I learned something new today! Going to put that env_file back now.
Moving .env
back to ./config/prod.mod.env
and setting that as the env_file
value worked! Up and running now.
Rolandgeider, thank you!
🙌🏻 🙌🏻 🙌🏻
glad you got it working!
Hi,
When starting the production compose file, I am encountering the following error in the celery worker container:
This feels similar to https://github.com/wger-project/docker/issues/63 but I haven't changed the permissions, and am not sure how to proceed with troubleshooting. So far I have tried deleting the volumes and re-starting, as well as starting 'db' first, letting it finish init, and then starting the other containers.
full logs: logs.txt
Shelling into db and checking the tables: