twenty/render.yaml
Ruslan 21c2834f52
Chore: Deploy to Render updated (#2033) (#2098)
Deploy to Render updated (#2033):

* postgres as a pserv (private service) compiled with pg_graphql
* default credentials (todo to fix), but postgres in a private network
* added FRONT_BASE_URL to server env
* added Dockerfile for postgres in infra/prod/postgres
* for server added dockerCommand with yarn database:setup
2023-10-18 13:54:12 +02:00

65 lines
1.5 KiB
YAML

services:
- type: web
name: front
env: docker
dockerfilePath: ./infra/prod/front/Dockerfile
autoDeploy: false
envVars:
- key: REACT_APP_SERVER_BASE_URL
fromService:
name: server
type: web
envVarKey: RENDER_EXTERNAL_URL
- type: web
name: server
env: docker
dockerfilePath: ./infra/prod/server/Dockerfile
dockerCommand: "sh -c yarn prisma:migrate && yarn database:setup && node dist/src/main"
autoDeploy: false
envVars:
- key: FRONT_BASE_URL
fromService:
name: front
type: web
envVarKey: RENDER_EXTERNAL_URL
- key: ACCESS_TOKEN_SECRET
generateValue: true
- key: LOGIN_TOKEN_SECRET
generateValue: true
- key: API_TOKEN_SECRET
generateValue: true
- key: REFRESH_TOKEN_SECRET
generateValue: true
- key: PG_DATABASE_HOST
fromService:
name: twenty_postgres
type: pserv
property: host
- key: PG_DATABASE_PORT
fromService:
name: twenty_postgres
type: pserv
property: port
- key: PG_DATABASE_URL
value: postgres://twenty:twenty@twenty-postgres:5432/default?connection_limit=1
disk:
name: twenty-disk
mountPath: /.local-storage
sizeGB: 5
- type: pserv
name: twenty_postgres
env: docker
dockerfilePath: ./infra/prod/postgres/Dockerfile
autoDeploy: false
disk:
name: data
mountPath: /var/lib/postgresql/data
sizeGB: 10
envVars:
- key: POSTGRES_USER
value: twenty
- key: POSTGRES_PASSWORD
value: twenty
- key: POSTGRES_DB
value: default