Closed Chelsea-Fox closed 2 years ago
Delete the container, you must not alter the database url in the config file when using Docker compose, its configured automatically.
The postgres
image is linked with void
container so you don't have to change the database url unless you are deploying it manually with node
.
Okay makes sense, thought that should have been the case.
Let me give that a shot now as last time it failed to login as the default admin:voiduser account.
**After a fresh install on a new VM, im still getting an error "User Not Found"
In the browser console I keep seeing 403 errors on the /api/user
, and 404 errors on /api/auth/login
**
Can you try inspecting the database?
Apologies Im not familiar interacting with a postgres db in a docker instance, what would you say is the best way about this?
Ive managed to connect up using psql command line, ive done a select * from information_schema.tables
to see any tables but there is no results brought back
Im thinking the migration has not applied
You can try using docker exec
in the void
container, and use prisma studio
inside it.
Remember to export DATABASE_URL=<the one in your config>
before executing prisma studio
btw.
Found that the database has some tables (looks like what id think the backend DB should look like)
Definitely looks like the default data has not been entered.
You can try prisma db seed
.
Would that be from within the docker container for postgres?
In the void
container.
Only way i can see to run that in the Void container is to sh into it.
when i try run prisma db seed
it is an unknown command
Try prepending yarn
or npx
before the command?
Trys to run however doesnt like the Database env variable.
Same thing happens with npx
You need to export DATABASE_URL=<the one in your config>
in the exec shell first.
After running the export
command doesnt seem to change much at all
going to try encapsulating the url in quotes
Still a no im afraid
sudo docker exec -i -t void_void_1 /bin/sh -c "DATABASE_URL=postgres://postgres:postgres@postgres/postgres yarn prisma db seed"
Thats it now.
Thanks for your help!
might be worth adding that into the docs as I presume im not the only one that will be effected by this?
No need to add as it happens with v0
only.
But if v0
has the issue then it should be documented somewhere for just that release?
Sure, it will be added to the README later.
HI, well done on this software, looks great, however I am having issues logging into the web interface.
I had followed the steps to run with compose and only thing I had changed in the config.toml was the database URL to @ localhost:5432 rather than @ postgress.
Previous to this change I would get a toast notification saying user not found for the default login.
After this change it gives an 500 error on the /api/auth/login
Any more info I need to add just ask and I can do testing on my deployment.