mirror of
https://github.com/twentyhq/twenty.git
synced 2024-11-21 16:12:18 +03:00
Fail entrypoint if migration fails (#8590)
If migration fails for some reason, the script runs anyway and creates the file which indicates that migration is complete. This is obviously not cool. If database is not available for some reason and migrations fail, the container should exit, not continue. Relevant stack overflow: https://stackoverflow.com/a/2871034
This commit is contained in:
parent
4f2019edae
commit
d90c3110cf
@ -1,4 +1,5 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
# 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
|
||||
|
Loading…
Reference in New Issue
Block a user