Skip to content

Commit

Permalink
Maintenance: Improve waiting for init container in docker compose stack
Browse files Browse the repository at this point in the history
  • Loading branch information
mgruner committed Aug 21, 2024
1 parent 1575ac6 commit 4cd0227
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion contrib/docker/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ ESCAPED_POSTGRESQL_PASS=$(echo "$POSTGRESQL_PASS" | sed -e 's/[\/&]/\\&/g')
export DATABASE_URL="postgres://${POSTGRESQL_USER}:${ESCAPED_POSTGRESQL_PASS}@${POSTGRESQL_HOST}:${POSTGRESQL_PORT}/${POSTGRESQL_DB}${POSTGRESQL_OPTIONS}"

function check_zammad_ready {
until bundle exec rails r ActiveRecord::Migration.check_pending! &> /dev/null; do
# Verify that migrations have been ran and seeds executed to process ENV vars like FQDN correctly.
until bundle exec rails r 'ActiveRecord::Migration.check_pending!; Locale.any? || raise' &> /dev/null; do
echo "waiting for init container to finish install or update..."
sleep 5
done
Expand Down

0 comments on commit 4cd0227

Please sign in to comment.