-
-
Notifications
You must be signed in to change notification settings - Fork 308
Feature: Backend/prisma: add support for postgresql database #833
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Define the `base` image templated to select the node and alpine version. Define the `NODE_VERSION` and `ALPINE_VERSION` to configure base image.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, that's a nice addition!
The backend/prisma/schema
folder is obsolete, isn't it?
Currently the Docker container can't start anymore. The npm run prod
command probably has to be adapted:
Error: Could not find Prisma Schema that is required for this command.
You can either provide it with `--schema` argument,
set it in your `prisma.config.ts`,
set it as `prisma.schema` in your package.json,
or put it into the default location (`./prisma/schema.prisma`, or `./schema.prisma`.
Checked following paths:
schema.prisma: file not found
prisma/schema.prisma: file not found
653129e
to
912dc5a
Compare
Normally it's fixed. I also fix the misplace migration folder ( also note that the future migrations should be generated for sqlite and postgresql. |
Move the `sqlite` prisma schema to a separate folder. - Split the schema into multiple file and use. - Enable `prismaSchemaFolder` feature flag. stable in next version (v6.7.0) - Add `--schema` to docker file contributing and configuration docs - Add `..` to database location to move it back where it was previously
Add prisma schema and init migration for postgresql database.
Add a new job to build and publish special image for postgresql.
912dc5a
to
6852a1d
Compare
Thanks for the changes. The container with the
The issue is probably caused by the |
Context
I am currently deploying Pingvin on kubernetes in high availability (multiple instance of the backend and frontend).
Issue
Currently Pingvin share only support SQLite as backend database.
This work well for small deployment withonly one instance of the backend.
But this don't scale with multiple backends as SQLite is a filesystem only database. This can work with a share filesystem but defeat the purpose/performance of the database.
PR
Prisma don't currently support dynamic datasource so this pr duplicate (with symlink) the schema files.
This also build and publish postgresql image (tag
postgresql-vX.X.X
).Note
This PR is related to #832