* feat: add one liner * fix: interactive issue & add support for both linux & mac * feat: move quick start documentation * feat: catch errors * feat: check if directory exists * feat: default to yes for prompt * feat: open in browser * fix: format * feat: do not expose STORAGE_LOCAL_PATH env but handle the case where it would be set * fix: db reset command wasn't working out of the box * Update install.sh Co-authored-by: Darek Desu <4459421+darekdesu@users.noreply.github.com> * feat: harden the whole UX with one-liner * fix: small logical order adjustment * Update packages/twenty-docs/docs/start/self-hosting/docker-compose.mdx --------- Co-authored-by: Darek Desu <4459421+darekdesu@users.noreply.github.com> Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
18 lines
578 B
Bash
Executable File
18 lines
578 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/${STORAGE_LOCAL_PATH:-.local-storage}/db_initialized ]; then
|
|
echo "Running database setup and migrations..."
|
|
|
|
# Run setup and migration scripts
|
|
npx ts-node ./scripts/setup-db.ts
|
|
yarn database:migrate:prod
|
|
|
|
# Mark initialization as done
|
|
echo "Successfuly migrated DB!"
|
|
touch /app/${STORAGE_LOCAL_PATH:-.local-storage}/db_initialized
|
|
fi
|
|
|
|
# Continue with the original Docker command
|
|
exec "$@"
|