mirror of
https://github.com/eitchtee/WYGIWYH.git
synced 2026-01-11 11:50:27 +01:00
It can't connect to Database using default settings. #57
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @rhesadaiva on GitHub (Aug 24, 2025).
I installed WYGIWYH via docker-compose, using this docker-compose (totally copied from docker-compose.prod.yml)
and using this .env based on .env.example (almost identically except the SQL_PASSWORD and SECRET_KEY)
and i'm running it using
docker-compose up -d. When i want to continue to next step, which isdocker compose exec -it web python manage.py createsuperuser, i got this errorIt seems the dockerhub images can't acknowledge the env. Is there any step maybe i've missed?
@eitchtee commented on GitHub (Aug 24, 2025):
That's weird... everything seems to be right. Maybe you created the database with another password and then changed it in the env file?
Try deleting or moving
./postgres_dataso we can get a fresh database instance:Make sure you're in WYGIWYH's folder. This will delete any data you have, but you probably don't have any. Let me know how it goes.
@rhesadaiva commented on GitHub (Aug 25, 2025):
I've done all the steps, but it still can't acknowledge the .env. The steps i've done:
docker-compose.prod.ymlcontent into file calleddocker-compose.yml, and the.env.exampleinto.env(i'm not cloning the repo)I've tried to delete the
./postgres_datafolder to create a fresh database instance again, and yep still got the same error. Is there any step i've missed?@eitchtee commented on GitHub (Aug 25, 2025):
I've tried setting up an instance using your provided docker-compose.yml and .env files, and it worked out of the box. So there's something strange going on with your setup.
Try doing this (make sure you're on the same folder as your docker-compose):
docker compose exec -it db bashroot@4597f3dfc838:/#will appear, typepsql -U wygiwyhand press Enterwygiwyh=#will appear, type:ALTER ROLE wygiwyh WITH PASSWORD 'klapaucius';and press Enterexit, press enter, then typeexitagain and press enter, this will return you to your normal enviroment.This will change the password of the database user wygiwyh to 'klapaucius' as you set on your .env. Restart the containers and see if the connection is working again.
If the steps below still doesn't work:
docker compose up -ddocker compose logs@doody commented on GitHub (Oct 5, 2025):
Just an update from my side, I was facing the same issue setting up my WYGIWYH instance, and I was having the exact same error yesterday, trying remove folders, restart containers etc., after a while, I realize it's because my container is running on a HDD based NAS and it took a while for PostgreSQL DB to initialize, you can try waiting for few min and take a look at the logs, mine took 5 min until my app entering into READY state. Hope this helps