File tree Expand file tree Collapse file tree 3 files changed +24
-6
lines changed
supervisor/services-cloudrun Expand file tree Collapse file tree 3 files changed +24
-6
lines changed Original file line number Diff line number Diff line change @@ -312,7 +312,7 @@ deploy_local() {
312312 # Update service file with project ID and image
313313 cp " $service_file " " ${service_file} .tmp"
314314 sed -i.bak " s/PROJECT_ID/$PROJECT_ID /g" " ${service_file} .tmp"
315- sed -i.bak " s|us-docker.pkg.dev/func-241017 /gcr.io/kernel-browser:latest|$image_name |g" " ${service_file} .tmp"
315+ sed -i.bak " s|us-docker.pkg.dev/$PROJECT_ID /gcr.io/kernel-browser:latest|$image_name |g" " ${service_file} .tmp"
316316
317317 gcloud run services replace " ${service_file} .tmp" \
318318 --region=" $REGION " \
Original file line number Diff line number Diff line change 11[program:chromium]
2- command=/bin/bash -lc 'sleep 3 && DISPLAY=":1" DBUS_SESSION_BUS_ADDRESS="unix:path=/tmp/dbus/session_bus_socket" chromium --remote-debugging-port=9223 --remote-allow-origins=* --user-data-dir=/home/kernel/user-data --password-store=basic --no-first-run --disable-dev-shm-usage --disable-gpu --start-maximized --disable-software-rasterizer --no-sandbox --disable-setuid-sandbox --disable-features=VizDisplayCompositor --custom-devtools-frontend=http://localhost:8001/ https://www.google.com '
2+ command=/bin/bash -lc 'sleep 3 && DISPLAY=":1" DBUS_SESSION_BUS_ADDRESS="unix:path=/tmp/dbus/session_bus_socket" chromium --remote-debugging-port=9223 --remote-allow-origins=* --user-data-dir=/home/kernel/user-data --password-store=basic --no-first-run --disable-dev-shm-usage --disable-gpu --start-maximized --disable-software-rasterizer --no-sandbox --disable-setuid-sandbox --disable-features=VizDisplayCompositor --custom-devtools-frontend=http://localhost:8001/'
33autostart=true
44autorestart=true
55startsecs=8
Original file line number Diff line number Diff line change 66
77set -e
88
9+ # Load environment variables from .env file if it exists
10+ if [ -f ../.env ]; then
11+ set -a
12+ . ../.env
13+ set +a
14+ elif [ -f .env ]; then
15+ set -a
16+ . .env
17+ set +a
18+ fi
19+
920# Configuration
10- PROJECT_ID=" ${PROJECT_ID:- func-241017 } "
21+ PROJECT_ID=" ${PROJECT_ID} "
1122SERVICE_NAME=" kernel-browser"
12- REGION=" us-central1"
23+ REGION=" ${REGION :- us-central1} "
1324
14- # Twilio credentials (set these as environment variables )
25+ # Twilio credentials (from environment or .env file )
1526TWILIO_ACCOUNT_SID=" ${TWILIO_ACCOUNT_SID} "
1627TWILIO_AUTH_TOKEN=" ${TWILIO_AUTH_TOKEN} "
1728
29+ if [ -z " $PROJECT_ID " ]; then
30+ echo " ❌ Error: PROJECT_ID must be set"
31+ echo " Set it in your .env file or export as environment variable:"
32+ echo " export PROJECT_ID=your-project-id"
33+ exit 1
34+ fi
35+
1836if [ -z " $TWILIO_ACCOUNT_SID " ] || [ -z " $TWILIO_AUTH_TOKEN " ]; then
1937 echo " ❌ Error: TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN must be set"
20- echo " Export them as environment variables:"
38+ echo " Set them in your .env file or export as environment variables:"
2139 echo " export TWILIO_ACCOUNT_SID=your_account_sid"
2240 echo " export TWILIO_AUTH_TOKEN=your_auth_token"
2341 exit 1
You can’t perform that action at this time.
0 commit comments