AlphaNecron / Void

Fast and elegant file hosting service.
MIT License
218 stars 13 forks source link

what is the default username/password ? #16

Closed changchichung closed 2 years ago

changchichung commented 2 years ago

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

AlphaNecron commented 2 years ago

Username: admin Password: voiduser

feskolech commented 2 years ago

image

admin:voiduser not working

feskolech commented 2 years ago

@AlphaNecron

AlphaNecron commented 2 years ago

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

feskolech commented 2 years ago

@AlphaNecron > User not found

AlphaNecron commented 2 years ago

Are you using docker?

feskolech commented 2 years ago

no, direct install image

AlphaNecron commented 2 years ago
sudo -u postgres psql
\x
TABLE "User";

The output is the username.

feskolech commented 2 years ago

image lol nothing

AlphaNecron commented 2 years ago

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

changchichung commented 2 years ago

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 commented 2 years ago

Try executing yarn prisma db seed in the docker container.

feskolech commented 2 years ago

image ok no way

AlphaNecron commented 2 years ago

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

AlphaNecron commented 2 years ago

Or whatever you put in your config.

AlphaNecron commented 2 years ago

Is the issue fixed?

changchichung commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

Please create a new issue.

AlphaNecron commented 2 years ago

Check whether void_postgres is running.