Files
eminuxCRM/bin/docker-entrypoint
T
eminuxandCursor c4e5f289cf
CI / scan_ruby (push) Failing after 11m20s
CI / scan_js (push) Successful in 10m35s
CI / lint (push) Has been cancelled
Commit iniziale di eminuxCRM: CRM Rails con pipeline, campagne email e Docker.
Include autenticazione, progetti isolati, mail marketing HTML con SMTP, test A/B e editor WYSIWYG.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-17 23:01:48 +02:00

22 lines
610 B
Bash
Executable File

#!/bin/bash
set -e
# Wait for postgres if DATABASE_HOST is set
if [ -n "${DATABASE_HOST}" ]; then
echo "Waiting for PostgreSQL at ${DATABASE_HOST}:${DATABASE_PORT:-5432}..."
until pg_isready -h "${DATABASE_HOST}" -p "${DATABASE_PORT:-5432}" -U "${POSTGRES_USER:-simplecrm}" >/dev/null 2>&1; do
sleep 1
done
echo "PostgreSQL is ready."
fi
# Prepare DB (create + migrate). Seed only when explicitly requested.
if [ "${RAILS_ENV}" = "production" ] || [ "${RAILS_ENV}" = "development" ]; then
./bin/rails db:prepare
if [ "${RUN_SEEDS}" = "true" ]; then
./bin/rails db:seed
fi
fi
exec "$@"