Files
calendars/bin/scalingo_run_web
2026-02-11 09:49:30 +01:00

25 lines
599 B
Bash

#!/bin/bash
# Parse DATABASE_URL into PG* vars for PHP and psql
source bin/export_pg_vars.sh
# Start PHP-FPM for SabreDAV (CalDAV server)
PHP_INI_SCAN_DIR=/app/.php/etc/php/8.3/cli/conf.d \
.php/usr/sbin/php-fpm8.3 \
--fpm-config /app/sabredav/php-fpm.conf \
--nodaemonize &
# Start the Django backend
gunicorn -b :8000 calendars.wsgi:application --log-file - &
# Start the Nginx server
bin/run &
# if the current shell is killed, also terminate all its children
trap "pkill SIGTERM -P $$" SIGTERM
# wait for a single child to finish,
wait -n
# then kill all the other tasks
pkill -P $$