Quick example of getting prisma 1x on kintohub. Due to the configuration file being in an environment variable, we had to create a Dockerfile for this.
This is also an example with Postgres
only at the moment. but can easily be changed in the prisma.config file and docker-compose file.
- Install Docker 2.x
- Run
docker-compose up -d
- Now you can accesss the endpoint at localhost:4466
- Fork or click "Use this Template" at the top right of the repository
- Login to kintohub
- Connect your git repository and make sure the forked or template you created has given access to KintoHub
- Create a new
Website
kintoblock - Set the
Name
and then chooseDynamic Web App
- Choose Language
Dockerfile
- Set Port to
4466
- Hit Create Website!
- Once the build is complete go to
Projects
on the left side bar - Create a new project
- In the
Add KintoBlocks
section, search for Your Block you just created - In the
Add KintoBlocks
section, search forPostgres
- Hit
Create Project
at the bottom right
This will take 2-3 minutes. The logs for your Prisma block will initially say "connection failed" while postgres is booting up. But after a couple minutes it should show up successfully
Make sure to change the default password for your postgres and the value in your prisma config
If you are looking to use this in production, reach out to the Kinto team in Discord and we'll create an example on how to Encrpyt your password successfully and setup Postgres for production