It was relatively complicated to get a local dev environment up and running so I was asked to dockerize it. I've updated the
README
on the repo but the important bits:- Install docker-compose and deps if you don't already have it installed
git clone git@github.com:stackernews/stacker.news.git sn && cd sn
docker-compose up --build
You should then be able to access the site at
localhost:3000
and any changes you make will hot reload. If you want to login locally or use lnd you'll need to modify .env.sample
appropriately. If you have trouble please open an issue so I can help and update the README
for everyone else.
prisma.queryRaw()
invocation:db
: the URL must start with the protocolpostgresql://
orpostgres://
. --> schema.prisma:6 | 5 | provider = "postgresql" 6 | url = env("DATABASE_URL") |.env.sample
file..env.sample
indocker-compose.yml
to./.env.sample
and tell me if that works? I suspect there's some implementation difference in docker across OS's but it might also be silently failing while parsing the file like @spraveenitpro is experiencing.npm fund
for details app | app | found 11 vulnerabilities (1 low, 4 moderate, 5 high, 1 critical) app | runnpm audit fix
to fix them, ornpm audit
for details app | npm verb exit [ 0, true ] app | npm timing npm Completed in 17968ms app | npm info ok app | Prisma schema loaded from prisma/schema.prisma app | Error: Get config: Schema Parsing P1012 app | app | error: Error validating datasourcedb
: the URL must start with the protocolpostgresql://
orpostgres://
. app | --> schema.prisma:6 app | | app | 5 | provider = "postgresql" app | 6 | url = env("DATABASE_URL") app | | app | app | Validation Error Count: 1 app | app | app | > stackernews@0.1.0 dev /app app | > NODE_OPTIONS='--trace-warnings' next dev app | app | ready - started server on 0.0.0.0:3000, url: http://localhost:3000 app | info - Using webpack 5. Reason: Enabled by default https://nextjs.org/docs/messages/webpack5 app | event - compiled successfully app | event - build page: / app | wait - compiling... app | event - compiled successfully app | event - build page: /api/auth/[...nextauth] app | wait - compiling... app | event - build page: /api/auth/[...nextauth] app | prisma:error app | error: Error validating datasourcedb
: the URL must start with the protocolpostgresql://
orpostgres://
. app | --> schema.prisma:6 app | | app | 5 | provider = "postgresql" app | 6 | url = env("DATABASE_URL") app | | app | app | Validation Error Count: 1 app | event - build page: /next/dist/pages/_error app | event - build page: /next/dist/pages/_error app | event - compiled successfully app | wait - compiling... app | error - ApolloError: app | Invalidprisma.queryRaw()
invocation: app | app | app | error: Error validating datasourcedb
: the URL must start with the protocolpostgresql://
orpostgres://
. app | --> schema.prisma:6 app | | app | 5 | provider = "postgresql" app | 6 | url = env("DATABASE_URL") app | | app | app | Validation Error Count: 1 app | at new ApolloError (/app/node_modules/@apollo/client/errors/errors.cjs.js:34:28) app | at /app/node_modules/@apollo/client/core/core.cjs.js:1575:47 app | at both (/app/node_modules/@apollo/client/utilities/utilities.cjs.js:981:53) app | at /app/node_modules/@apollo/client/utilities/utilities.cjs.js:974:72 app | at new Promise (<anonymous>) app | at Object.then (/app/node_modules/@apollo/client/utilities/utilities.cjs.js:974:24) app | at Object.next (/app/node_modules/@apollo/client/utilities/utilities.cjs.js:982:49) app | at notifySubscription (/app/node_modules/zen-observable/lib/Observable.js:135:18) app | at onNotify (/app/node_modules/zen-observable/lib/Observable.js:179:3) app | at SubscriptionObserver.next (/app/node_modules/zen-observable/lib/Observable.js:235:7) { app | graphQLErrors: [ app | Error: app | Invalidprisma.queryRaw()
invocation: app |