File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -372,7 +372,7 @@ post_checks() {
372372}
373373
374374print_notes () {
375- cat << ' EOF '
375+ cat << EOF
376376
377377Deployment complete.
378378
@@ -382,17 +382,17 @@ If the domain does not come up immediately:
3823823. Check logs:
383383 docker compose -f docker-compose.yml -f docker-compose.traefik.yml logs -f
3843844. Confirm backend health locally:
385- curl -fsS http://127.0.0.1:8888/api/health || true
385+ curl -fsS http://127.0.0.1:${APP_PORT :- 8888} /api/health || true
386386
387387To update later, rerun this script. It will git pull and restart.
388388EOF
389389}
390390
391391ensure_packages
392392configure_duckdns
393+ preserve_env_file
393394clone_repo
394395assert_compose_files
395- preserve_env_file
396396write_env
397397prepare_ssl_storage
398398run_compose
Original file line number Diff line number Diff line change @@ -34,7 +34,13 @@ prompt_required LETSENCRYPT_EMAIL "Enter email for Let's Encrypt notifications"
3434if [[ " ${DOMAIN} " == * .duckdns.org ]]; then
3535 DUCKDNS_SUBDOMAIN=" ${DOMAIN% .duckdns.org} "
3636else
37- DUCKDNS_SUBDOMAIN=" ${DOMAIN} "
37+ echo " WARNING: Domain '${DOMAIN} ' does not end with .duckdns.org."
38+ echo " DuckDNS API requires a duckdns.org subdomain."
39+ read -r -p " Enter just the DuckDNS subdomain (without .duckdns.org): " DUCKDNS_SUBDOMAIN
40+ if [[ -z " $DUCKDNS_SUBDOMAIN " ]]; then
41+ echo " DuckDNS subdomain cannot be empty." >&2
42+ exit 1
43+ fi
3844fi
3945
4046read -r -p " Git repo URL [https://github.com/heidi-dang/autocoder.git]: " REPO_URL
Original file line number Diff line number Diff line change @@ -163,6 +163,9 @@ async def preview_workflow(request: PreviewRequest):
163163 if not project_dir :
164164 raise HTTPException (status_code = 404 , detail = "Project not found" )
165165
166+ if not project_dir .exists ():
167+ raise HTTPException (status_code = 404 , detail = "Project directory not found" )
168+
166169 if request .workflow_type not in ["ci" , "security" , "deploy" ]:
167170 raise HTTPException (
168171 status_code = 400 ,
@@ -253,4 +256,5 @@ async def get_workflow_content(project_name: str, filename: str):
253256 "content" : content ,
254257 }
255258 except Exception as e :
256- raise HTTPException (status_code = 500 , detail = f"Error reading workflow: { str (e )} " )
259+ logger .exception (f"Error reading workflow { filename } : { e } " )
260+ raise HTTPException (status_code = 500 , detail = "Error reading workflow" )
You can’t perform that action at this time.
0 commit comments