Ready to use graphql-boilerplate with prisma2 and typescript.
- Create docker-compose.yml in project root directory
version: "3"
services:
prisma:
image: prismagraphql/prisma:1.34
restart: always
ports:
- "4466:4466"
environment:
PRISMA_CONFIG: |
port: 4466
# uncomment the next line and provide the env var PRISMA_MANAGEMENT_API_SECRET=my-secret to activate cluster security
# managementApiSecret: my-secret
databases:
default:
connector: postgres
host:
database:
user:
password:
ssl: true
rawAccess: true
port: '5432'
migrations: true
- Run
docker-compose up -d
- Push your updated prisma scheme to db
npx prisma db push ---preview-feature
- Update sample.env endpoint & secret
- Run
yarn run codegen
- Generated types and scheme will be available inside
src/generated