Skip to content

Commit 455f935

Browse files
adding migration and email template setup
1 parent ba30666 commit 455f935

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

build/docker/entrypoint.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,14 @@ shutdown() {
2222
# Trap SIGTERM and SIGINT signals (container stop or AWS shutdown notice)
2323
trap shutdown SIGTERM SIGINT
2424

25+
# Apply database migrations
26+
echo "Applying database migrations..."
27+
python manage.py migrate
28+
29+
# Set up email templates with the --force option
30+
echo "Setting up email templates..."
31+
python manage.py setup_email_templates --force
32+
2533
# Start Gunicorn in the background with graceful timeout
2634
echo "Starting Gunicorn..."
2735
gunicorn --bind 0.0.0.0:8000 setup.wsgi:application --workers 4 --timeout 90 &

0 commit comments

Comments
 (0)