Closed changchichung closed 2 years ago
Username: admin
Password: voiduser
admin:voiduser not working
@AlphaNecron
admin:voiduser
is the default credential. If you can't login, try admin:draconicuser
@AlphaNecron > User not found
Are you using docker
?
no, direct install
sudo -u postgres psql
\x
TABLE "User";
The output is the username.
lol nothing
Use yarn prisma db seed
if you are using yarn
or npx prisma db seed
if you are using npm
.
admin:voiduser
or admin:draconicuser
are both wrong .
I'm using docker-compose, and here is the docker-compose.yml I change the expose port only.
version: '3'
services:
postgres:
image: postgres
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DATABASE=postgres
volumes:
- pg_data:/var/lib/postgresql/data
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U postgres']
interval: 10s
timeout: 5s
retries: 5
void:
image: ghcr.io/alphanecron/void/void:v0
ports:
- '805:3000'
restart: unless-stopped
volumes:
- './uploads:/void/uploads'
- './public:/void/public'
- './config.toml:/void/config.toml'
depends_on:
- 'postgres'
volumes:
pg_data:
Try executing yarn prisma db seed
in the docker container.
ok no way
Do export DATABASE_URL=postgres://postgres:postgres@postgres/postgres
first.
Or whatever you put in your config.
Is the issue fixed?
yes , after running the commands you provided , now I can login with admin/voiduser
/void # export DATABASE_URL=postgres://postgres:postgres@postgres/postgres
/void # yarn prisma db seed
yarn run v1.22.15
$ /void/node_modules/.bin/prisma db seed
Running seed command `ts-node --compiler-options {"module":"commonjs"} prisma/seed.ts` ...
12:41:15 PM INFO/SEED Created default user with username "admin" and password "voiduser"
🌱 The seed command has been executed.
Done in 4.92s.
/void #
and I also want to point out the $PWD variable in docker-compose was not working. I had to update $PWD to . like
volumes:
- './uploads:/void/uploads'
- './public:/void/public'
- './config.toml:/void/config.toml'
hope these problems can be solved in next release.
Hi @AlphaNecron , I'm encountering an error when attempting this (docker-compose). Any ideas?
/void # export DATABASE_URL=postgres://postgres:<password>@postgres/postgres
/void # yarn prisma db seed
yarn run v1.22.15
$ /void/node_modules/.bin/prisma db seed
Running seed command `ts-node --compiler-options {"module":"commonjs"} prisma/seed.ts` ...
PrismaClientKnownRequestError:
Invalid `prisma.user.aggregate()` invocation:
The table `public.User` does not exist in the current database.
at cb (/void/node_modules/@prisma/client/runtime/index.js:38537:17)
at async main (/void/prisma/seed.ts:8:17) {
code: 'P2021',
clientVersion: '3.3.0',
meta: { table: 'public.User' }
}
An error occured while running the seed command:
Error: Command failed with exit code 1: ts-node --compiler-options {"module":"commonjs"} prisma/seed.ts
I've also tried npx...
with the same result.
Thank you,
Please create a new issue.
Check whether void_postgres
is running.
I cant' find anything about default login information in README or config files. so what is the default username/password ? ??