2024-08-11 15:53:56 +02:00
|
|
|
|
#!/bin/sh
|
|
|
|
|
|
2024-08-28 11:10:53 +02:00
|
|
|
|
# Copy default logo to the frontend public folder if it doesn't exist
|
|
|
|
|
cp -rn /tmp/img/* /opt/app/frontend/public/img
|
|
|
|
|
|
2024-08-11 15:53:56 +02:00
|
|
|
|
# Start Caddy
|
2024-09-18 23:01:50 +02:00
|
|
|
|
if [ "$TRUST_PROXY" = "true" ]; then
|
|
|
|
|
caddy start --config /etc/caddy/Caddyfile.trust-proxy &
|
|
|
|
|
else
|
|
|
|
|
caddy start --config /etc/caddy/Caddyfile &
|
|
|
|
|
fi
|
|
|
|
|
|
2024-08-11 15:53:56 +02:00
|
|
|
|
# Run the frontend server
|
|
|
|
|
PORT=3333 HOSTNAME=0.0.0.0 node frontend/server.js &
|
2024-09-18 23:01:50 +02:00
|
|
|
|
|
2024-08-11 15:53:56 +02:00
|
|
|
|
# Run the backend server
|
|
|
|
|
cd backend && npm run prod
|
2024-09-18 23:01:50 +02:00
|
|
|
|
|
2024-08-11 15:53:56 +02:00
|
|
|
|
# Wait for all processes to finish
|
2024-08-28 11:10:53 +02:00
|
|
|
|
wait -n
|