Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3207 fix render self deploy #3221

Merged
merged 7 commits into from
Jan 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/twenty-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"typeorm:migrate": "yarn typeorm migration:run -d ./src/database/typeorm/metadata/metadata.datasource.ts && yarn typeorm migration:run -d ./src/database/typeorm/core/core.datasource.ts",
"database:init": "yarn database:setup && yarn database:seed:dev",
"database:setup": "npx ts-node ./scripts/setup-db.ts && yarn database:migrate",
"database:setup:prod": "npx ts-node ./scripts/setup-db.ts && yarn typeorm:migrate",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't you also seed in this one?

Copy link
Contributor Author

@martmull martmull Jan 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we said we should not seed. Seeds are run when a workspace is created so we don't need them here i beleive

"database:truncate": "npx ts-node ./scripts/truncate-db.ts",
"database:migrate": "yarn build && yarn typeorm:migrate",
"database:seed:dev": "yarn build && yarn command workspace:seed:dev",
Expand Down
4 changes: 2 additions & 2 deletions packages/twenty-server/scripts/render-run.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
export PG_DATABASE_URL=postgres://twenty:twenty@$PG_DATABASE_HOST:$PG_DATABASE_PORT/default
yarn database:setup
node dist/src/main
yarn database:setup:prod
node dist/src/main
17 changes: 9 additions & 8 deletions render.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
services:
- type: web
name: front
env: docker
dockerfilePath: ./infra/prod/front/Dockerfile
runtime: docker
dockerfilePath: ./packages/twenty-docker/prod/twenty-front/Dockerfile
autoDeploy: false
envVars:
- key: REACT_APP_SERVER_BASE_URL
Expand All @@ -12,8 +12,8 @@ services:
envVarKey: RENDER_EXTERNAL_URL
- type: web
name: server
env: docker
dockerfilePath: ./infra/prod/server/Dockerfile
runtime: docker
dockerfilePath: ./packages/twenty-docker/prod/twenty-server/Dockerfile
dockerCommand: "sh -c ./scripts/render-run.sh"
autoDeploy: false
envVars:
Expand Down Expand Up @@ -44,17 +44,18 @@ services:
sizeGB: 5
- type: pserv
name: twenty_postgres
env: docker
dockerfilePath: ./infra/prod/postgres/Dockerfile
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: twenty
value: postgres
- key: POSTGRES_PASSWORD
value: twenty
value: postgres
- key: POSTGRES_DB
value: default
Loading