Closed JannikStreek closed 5 months ago
@AugustinMauroy database is configurable from compose setup, but I made Postgres the default as I think its the most used default option nowadays
@JannikStreek did you test with prisma client ?
@JannikStreek did you test with prisma client ?
generate works - or which commands would you test?
generate works - or which commands would you test?
If you run an dev env you should have an get api entry point at /api/pad
it's create on pad if there are no pad on db and if there are one ore more it's send JSON data.
I'm not able to test now. But we need to test if it's work with mysql and posgress
generate works - or which commands would you test?
If you run an dev env you should have an get api entry point at
/api/pad
it's create on pad if there are no pad on db and if there are one ore more it's send JSON data.I'm not able to test now. But we need to test if it's work with mysql and posgress
it works (for Postgres). what's the preferred way in development to create the schema? the command npm run db:migrate
wants to create a migration file - which shouldn't be the case at least now...so I have used npx prisma db push
(create schema with bypassing migrations). I haven't found anything in the tech docs regarding that. So I added that as well to the docker setup instructions.
it works (for Postgres). what's the preferred way in development to create the schema? the command npm run db:migrate wants to create a migration file - which shouldn't be the case at least now...so I have used npx prisma db push (create schema with bypassing migrations). I haven't found anything in the tech docs regarding that. So I added that as well to the docker setup instructions.
Honestly, I'm not an expert on Prisma. So for the moment, if the little API works for me, that's OK. We'll rectify the situation if necessary in the future.
I've run the commands that are in the technical docs for a dev environment. And the Prisma client doesn't build.
I've run the commands that are in the technical docs for a dev environment. And the Prisma client doesn't build.
so for Postgres, right? or for mysql?
so for Postgres, right? or for mysql?
Postgres.
So what I do
so for Postgres, right? or for mysql?
Postgres.
So what I do
- start docker
- cp .env.example cp .env
- fill with it with dev for every entry
- run command specify on docs.
I missed the app
part in the docker compose exec app npx prisma db push
command in the docs. Fixed it. Maybe thats where it didn't work out? Where exactly did you have trouble with?
I missed the app part in the docker compose exec app npx prisma db push command in the docs. Fixed it. Maybe thats where it didn't work out? Where exactly did you have trouble with?
gotcha, it's should work. I'm at school so I cannot test if it's work on my machine.
Hey !
I foolishly followed the guide to run the dev environment and this is what I got. I think something needs to be done.
So .env
:
DATABASE_PROVIDER=postgresql
# Docker compose variables
POSTGRES_PASSWORD=dev
POSTGRES_USER=dev
POSTGRES_DB=etherpad-next
# In case you don't use docker compose
# DATABASE_URL=postgresql://postgres-user:postgres-password@postgres:5432/etherpad-next
and I got
PrismaClientInitializationError: Authentication failed against database server at `postgres`, the provided database credentials for `dev` are not valid.
Hey ! I foolishly followed the guide to run the dev environment and this is what I got. I think something needs to be done. So
.env
:DATABASE_PROVIDER=postgresql # Docker compose variables POSTGRES_PASSWORD=dev POSTGRES_USER=dev POSTGRES_DB=etherpad-next # In case you don't use docker compose # DATABASE_URL=postgresql://postgres-user:postgres-password@postgres:5432/etherpad-next
and I got
PrismaClientInitializationError: Authentication failed against database server at `postgres`, the provided database credentials for `dev` are not valid.
you most likely have an existing db. try docker compose down -v
and then the up command again.
you most likely have an existing db. try docker compose down -v and then the up command again.
ok finally work. Sorry I'm not docker expert
@SamTV12345 i want your opinion
I'll take a look at it. Haven't worked with Prisma yet but the docker stuff seems to be fine. That maybe explains why next was always building with webpack on my machine. Don't have turbo installed locally.
That maybe explains why next was always building with webpack on my machine. Don't have turbo installed locally.
Like explain to @JannikStreek there are two tools call turbo
(Vercel want to merge it). One turborepo
we use it for dev/build caching. and second turbopack
use in dev env for nextjs to compile and HMR, it's will come for building. So yeah nextjs still use webpack as builder
When I run npx prisma generate
it generates something along the lines of \prisma\@prisma\client\mysql. Is this still the old mysql client or the new postgres client but without the renaming?
Other than that. Schema generation worked without a problem :). Well done.
When I run
npx prisma generate
it generates something along the lines of \prisma@prisma\client\mysql. Is this still the old mysql client or the new postgres client but without the renaming?
I left the mysql generator in the code, alongside with the default one for Postgres. I imagine it's created due to that. I just left it there because I wasn't sure anyone wants to continue with mysql in a local setup.
@AugustinMauroy Docker usage is optional, but docker reaps many benefits in a multi developer setup. Otherwise there will always the famous "works on my machine" phrase. with docker we can each have the exact same setup. Thats what I like about it.
I would merge this then, if there are no more open issues.
Ah alright. Sure feel free to merge this. Thanks :).
Description
Adds docker support
Related Issues
closes #66