mirror of
https://github.com/suitenumerique/messages.git
synced 2026-09-07 02:17:45 +02:00
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>
24 lines
712 B
Bash
24 lines
712 B
Bash
#!/bin/bash
|
|
|
|
set -o errexit # always exit on error
|
|
set -o pipefail # don't ignore exit codes when piping output
|
|
|
|
echo "-----> Running post-frontend script"
|
|
|
|
# Move the frontend build to the app root and clean up
|
|
mkdir -p build/
|
|
mv src/frontend/dist build/frontend-out
|
|
|
|
mv src/backend/* ./
|
|
mkdir -p messages_backend && touch messages_backend/__init__.py
|
|
|
|
# Download Caddy binary
|
|
CADDY_VERSION="2.9.1"
|
|
curl -fsSL "https://github.com/caddyserver/caddy/releases/download/v${CADDY_VERSION}/caddy_${CADDY_VERSION}_linux_amd64.tar.gz" | tar -xz -C bin/ caddy
|
|
chmod +x bin/caddy
|
|
|
|
# Copy Caddyfile (uses {$ENV} vars natively, no ERB needed)
|
|
cp src/frontend/caddy/Caddyfile ./Caddyfile
|
|
|
|
echo "3.14" > .python-version
|