Coder Social home page Coder Social logo

Comments (20)

changchichung avatar changchichung commented on July 23, 2024 3

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.

from void.

AlphaNecron avatar AlphaNecron commented on July 23, 2024 2

Username: admin
Password: voiduser

from void.

AlphaNecron avatar AlphaNecron commented on July 23, 2024 1

Please create a new issue.

from void.

AlphaNecron avatar AlphaNecron commented on July 23, 2024 1

Check whether void_postgres is running.

from void.

feskolech avatar feskolech commented on July 23, 2024

image

admin:voiduser not working

from void.

feskolech avatar feskolech commented on July 23, 2024

@AlphaNecron

from void.

AlphaNecron avatar AlphaNecron commented on July 23, 2024

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

from void.

feskolech avatar feskolech commented on July 23, 2024

@AlphaNecron > User not found

from void.

AlphaNecron avatar AlphaNecron commented on July 23, 2024

Are you using docker?

from void.

feskolech avatar feskolech commented on July 23, 2024

no, direct install
image

from void.

AlphaNecron avatar AlphaNecron commented on July 23, 2024
sudo -u postgres psql
\x
TABLE "User";

The output is the username.

from void.

feskolech avatar feskolech commented on July 23, 2024

image
lol nothing

from void.

AlphaNecron avatar AlphaNecron commented on July 23, 2024

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

from void.

changchichung avatar changchichung commented on July 23, 2024

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:

from void.

AlphaNecron avatar AlphaNecron commented on July 23, 2024

Try executing yarn prisma db seed in the docker container.

from void.

feskolech avatar feskolech commented on July 23, 2024

image
ok no way

from void.

AlphaNecron avatar AlphaNecron commented on July 23, 2024

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

from void.

AlphaNecron avatar AlphaNecron commented on July 23, 2024

Or whatever you put in your config.

from void.

AlphaNecron avatar AlphaNecron commented on July 23, 2024

Is the issue fixed?

from void.

tmeuze avatar tmeuze commented on July 23, 2024

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,

from void.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.