* [FIX] DOCKER: Update docker files to standardize the dev and prod Docker image * [FIX] DOCKER: Fix docker configuration of Horilla for runtime errors * [FIX] Standardise and reduce Docker configuration of Horilla * [UPDT] DOCKER: Standardise directory structure of Docker and related files for Horilla standards (#934) * Multi stage Dockerfile for size reduction
20 lines
343 B
Bash
Executable File
20 lines
343 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
echo "Starting Horilla HR..."
|
|
|
|
# Wait for PostgreSQL to be ready
|
|
echo "Waiting for PostgreSQL..."
|
|
while ! nc -z db 5432; do
|
|
sleep 0.1
|
|
done
|
|
echo "PostgreSQL is ready!"
|
|
|
|
# Run migrations
|
|
python manage.py migrate --noinput
|
|
|
|
# Collect static files
|
|
python manage.py collectstatic --noinput
|
|
|
|
echo "Starting server..."
|
|
exec "$@" |