Hello team, - Modified File: `packages/twenty-docker/twenty/entrypoint.sh` - Reason: The current `entrypoint.sh` works fine for server with RAM more than 8GB. But the server with less RAM will give error while running `scripts/setup-db.ts`.  - My commit: It will set `NODE_OPTIONS="--max-old-space-size=8192"` in docker entrypoint which guarantee to run the script successfully. --------- Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
18 lines
557 B
Bash
Executable File
18 lines
557 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# Check if the initialization has already been done and that we enabled automatic migration
|
|
if [ "${ENABLE_DB_MIGRATIONS}" = "true" ] && [ ! -f /app/docker-data/db_status ]; then
|
|
echo "Running database setup and migrations..."
|
|
|
|
# Run setup and migration scripts
|
|
NODE_OPTIONS="--max-old-space-size=1500" npx ts-node ./scripts/setup-db.ts
|
|
yarn database:migrate:prod
|
|
|
|
# Mark initialization as done
|
|
echo "Successfuly migrated DB!"
|
|
touch /app/docker-data/db_status
|
|
fi
|
|
|
|
# Continue with the original Docker command
|
|
exec "$@"
|