Commit f8570f79 authored by Administrator's avatar Administrator

Update deploy.sh via Son of Anton

parent d1529b5f
#!/bin/bash
set -e
APP=${1:-"all"}
CAPROVER_APP_BACKEND="thegrind-api"
CAPROVER_APP_FRONTEND="thegrind"
deploy_backend() {
echo "🚀 Deploying backend..."
echo '{"schemaVersion":2,"dockerfilePath":"./Dockerfile.backend"}' > captain-definition
caprover deploy -a $CAPROVER_APP_BACKEND
rm -f captain-definition
echo "✅ Backend deployed!"
}
deploy_frontend() {
echo "🚀 Deploying frontend..."
echo '{"schemaVersion":2,"dockerfilePath":"./Dockerfile.frontend"}' > captain-definition
caprover deploy -a $CAPROVER_APP_FRONTEND
rm -f captain-definition
echo "✅ Frontend deployed!"
}
case $APP in
backend)
deploy_backend
;;
frontend)
deploy_frontend
;;
all)
deploy_backend
deploy_frontend
;;
*)
echo "Usage: ./deploy.sh [backend|frontend|all]"
exit 1
;;
esac
echo "🎉 Deployment complete!"
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment