Add Dockerfile and Makefile for cloudflared tunnel setup; include startup script

This commit is contained in:
2025-08-14 23:49:19 +05:30
parent 5902300c95
commit 9474d2f633
3 changed files with 40 additions and 9 deletions

16
new-backend/start.sh Normal file
View File

@@ -0,0 +1,16 @@
#!/bin/sh
# Start the backend
/monaco-backend &
BACKEND_PID=$!
echo "Backend started with PID: $BACKEND_PID"
# Wait for backend to start
echo "Waiting for backend to initialize..."
sleep 5
# Start cloudflared tunnel using config file
echo "Starting Cloudflare tunnel to api.ishikabhoyar.tech..."
cloudflared tunnel --no-autoupdate run --config /etc/cloudflared/config.json
# If cloudflared exits, kill the backend too
kill $BACKEND_PID