Feature: Backend/prisma: add support for postgresql database - #833
Feature: Backend/prisma: add support for postgresql database#833JulesdeCube wants to merge 4 commits into
Conversation
Define the `base` image templated to select the node and alpine version. Define the `NODE_VERSION` and `ALPINE_VERSION` to configure base image.
stonith404
left a comment
There was a problem hiding this comment.
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