Skip to content
This repository has been archived by the owner on Dec 1, 2023. It is now read-only.

what is the default username/password ? #16

Closed
changchichung opened this issue Nov 9, 2021 · 20 comments
Closed

what is the default username/password ? #16

changchichung opened this issue Nov 9, 2021 · 20 comments

Comments

@changchichung
Copy link

I cant' find anything about default login information in README or config files.
so what is the default username/password ? ??

@AlphaNecron
Copy link
Owner

Username: admin
Password: voiduser

@feskolech
Copy link

feskolech commented Nov 9, 2021

image

admin:voiduser not working

@feskolech
Copy link

@AlphaNecron

@AlphaNecron
Copy link
Owner

admin:voiduser is the default credential. If you can't login, try admin:draconicuser

@feskolech
Copy link

@AlphaNecron > User not found

@AlphaNecron
Copy link
Owner

Are you using docker?

@AlphaNecron AlphaNecron reopened this Nov 9, 2021
@feskolech
Copy link

no, direct install
image

@AlphaNecron
Copy link
Owner

sudo -u postgres psql
\x
TABLE "User";

The output is the username.

@feskolech
Copy link

image
lol nothing

@AlphaNecron
Copy link
Owner

Use yarn prisma db seed if you are using yarn or npx prisma db seed if you are using npm.

@changchichung
Copy link
Author

changchichung commented Nov 9, 2021

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:

@AlphaNecron
Copy link
Owner

Try executing yarn prisma db seed in the docker container.

@feskolech
Copy link

image
ok no way

@AlphaNecron
Copy link
Owner

Do export DATABASE_URL=postgres://postgres:postgres@postgres/postgres first.

@AlphaNecron
Copy link
Owner

Or whatever you put in your config.

@AlphaNecron
Copy link
Owner

Is the issue fixed?

@changchichung
Copy link
Author

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.

@tmeuze
Copy link

tmeuze commented Feb 15, 2022

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,

@AlphaNecron
Copy link
Owner

Please create a new issue.

@AlphaNecron
Copy link
Owner

Check whether void_postgres is running.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants