mirror of
https://github.com/twentyhq/twenty.git
synced 2024-11-24 14:53:52 +03:00
736635a94b
We will remove the `twenty-postgres` image that was used for local development and only use `twenty-postgres-pilo` (which we use in prod), bringing the development environment closer to prod and avoiding having to maintain 2 images. Instead of provisioning the super user after the db initialization, we directly rely on the superuser provided by Spilo for simplicity. We also introduce a change that tries to create the right database (`default` or `test`) based on the context. How to test: ``` docker build -t twentycrm/twenty-postgres-spilo:latest -f ./packages/twenty-docker/twenty-postgres-spilo/Dockerfile . docker images --no-trunc | grep twenty-postgres-spilo postgres-on-docker: docker run \ --name twenty_pg \ -e PGUSER_SUPERUSER=twenty \ -e PGPASSWORD_SUPERUSER=twenty \ -e ALLOW_NOSSL=true \ -v twenty_db_data:/home/postgres/pgdata \ -p 5432:5432 \ REPLACE_WITH_IMAGE_ID ```
84 lines
1.8 KiB
YAML
84 lines
1.8 KiB
YAML
services:
|
|
- type: web
|
|
name: server
|
|
runtime: image
|
|
image:
|
|
url: twentycrm/twenty:latest
|
|
dockerCommand: "sh -c ./scripts/render-run.sh"
|
|
autoDeploy: false
|
|
plan: standard
|
|
envVars:
|
|
- key: FRONT_BASE_URL
|
|
fromService:
|
|
name: server
|
|
type: web
|
|
envVarKey: RENDER_EXTERNAL_URL
|
|
- key: SERVER_URL
|
|
fromService:
|
|
name: server
|
|
type: web
|
|
envVarKey: RENDER_EXTERNAL_URL
|
|
- key: APP_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
|
|
- type: worker
|
|
name: worker
|
|
runtime: image
|
|
image:
|
|
url: twentycrm/twenty:latest
|
|
dockerCommand: "sh -c ./scripts/render-worker.sh"
|
|
autoDeploy: false
|
|
plan: standard
|
|
envVars:
|
|
- key: FRONT_BASE_URL
|
|
fromService:
|
|
name: server
|
|
type: web
|
|
envVarKey: RENDER_EXTERNAL_URL
|
|
- key: SERVER_URL
|
|
fromService:
|
|
name: server
|
|
type: web
|
|
envVarKey: RENDER_EXTERNAL_URL
|
|
- key: APP_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
|
|
disk:
|
|
name: twenty-disk
|
|
mountPath: /.local-storage
|
|
sizeGB: 5
|
|
- type: pserv
|
|
name: twenty_postgres
|
|
plan: starter
|
|
runtime: image
|
|
image:
|
|
url: twentycrm/twenty-postgres:latest
|
|
autoDeploy: false
|
|
disk:
|
|
name: data
|
|
mountPath: /var/lib/postgresql/data
|
|
sizeGB: 10
|
|
envVars:
|
|
- key: POSTGRES_USER
|
|
value: postgres
|
|
- key: POSTGRES_PASSWORD
|
|
value: postgres
|