Files
lasuite-messages/bin/scalingo_run_web
638a2de121 ♻️(frontend) drop next.js for vite + tanstack router (#675)
Next.js has been concerned by several CVEs last time and it's clearly
overkill for our needs (static export) so in order to enlight our stack
we migrate to vite & tanstack-router

Co-authored-by: jbpenrath <jb.penrath@gmail.com>
2026-06-09 11:58:51 +02:00

21 lines
644 B
Bash

#!/bin/bash
# Set defaults for Caddy env vars
export MESSAGES_FRONTEND_ROOT="${MESSAGES_FRONTEND_ROOT:-/app/build/frontend-out}"
export MESSAGES_FRONTEND_BACKEND_SERVER="${MESSAGES_FRONTEND_BACKEND_SERVER:-localhost:8000}"
export DJANGO_ADMIN_URL="${DJANGO_ADMIN_URL:-admin}"
# Start the Django backend server
gunicorn -b :8000 messages.wsgi:application --log-file - &
# Start the Caddy server
bin/caddy run --config Caddyfile --adapter caddyfile &
# 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 $$