bottleneckcrm/docker/backend/entrypoint.sh
ashwin31 1f6b797909 feat: add Docker Compose setup for local development
Dockerize the full stack so developers can run everything with
`docker compose up`. Replaces the outdated Dockerfile and
docker-compose.yml with a working 6-service setup: PostgreSQL,
Redis, Django backend, Celery worker, Celery beat, and SvelteKit
frontend.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 10:01:50 +05:30

22 lines
504 B
Bash
Executable file

#!/bin/bash
set -e
echo "Waiting for PostgreSQL..."
while ! python -c "
import socket, os
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((os.environ['DBHOST'], int(os.environ['DBPORT'])))
s.close()
" 2>/dev/null; do
sleep 1
done
echo "PostgreSQL is ready."
echo "Running migrations..."
python manage.py migrate --noinput
echo "Collecting static files..."
python manage.py collectstatic --noinput
echo "Starting development server..."
exec python manage.py runserver 0.0.0.0:8000