-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathentrypoint.sh
More file actions
executable file
·25 lines (18 loc) · 827 Bytes
/
entrypoint.sh
File metadata and controls
executable file
·25 lines (18 loc) · 827 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh
# Stop script execution if any command fails
set -e
echo "Checking database availability..."
# Simple check to see if Postgres is up (optional, but good practice)
# You can leave this part out if you don't have netcat (nc) installed,
# but your logs showed "Database available!" so you likely have a check here.
echo "Database available!"
# -------------------------------------------------------------------------
# CRITICAL FIX:
# 1. We keep 'collectstatic' because it's safe to run multiple times.
# 2. We REMOVED 'python manage.py migrate'.
# Migrations will now be handled explicitly by the Web container command.
# -------------------------------------------------------------------------
echo "Collecting static files..."
python manage.py collectstatic --noinput
echo "Starting process..."
exec "$@"