Add Dockerfile and Makefile for cloudflared tunnel setup; include startup script
This commit is contained in:
16
new-backend/start.sh
Normal file
16
new-backend/start.sh
Normal 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
|
||||
Reference in New Issue
Block a user