Skip to content

Commit

Permalink
Fix serverless start. Fix auth cookie name
Browse files Browse the repository at this point in the history
  • Loading branch information
robballantyne committed Aug 1, 2024
1 parent de3acf7 commit 3025a4b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ jobs:
TAGS="${img_path_ghcr}:${base_tag}, ${img_path_ghcr}:latest-rocm"
TAGS="${TAGS}, ${img_path_dhub}:${base_tag}, ${img_path_dhub}:latest-rocm"
else
TAGS="${img_path}:${base_tag}"
TAGS="${img_path_ghcr}:${base_tag}, ${img_path_dhub}:${base_tag}"
fi
echo "TAGS=${TAGS}" >> ${GITHUB_ENV}
-
Expand Down
2 changes: 1 addition & 1 deletion build/COPY_ROOT_0/opt/ai-dock/bin/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function init_main() {
function init_set_envs() {
# Common services that we don't want in serverless mode
if [[ ${SERVERLESS,,} == "true" && -z $SUPERVISOR_NO_AUTOSTART ]]; then
export SUPERVISOR_NO_AUTOSTART="syncthing,jupyter,quicktunnel,cloudflared"
export SUPERVISOR_NO_AUTOSTART="caddy,cloudflared,jupyter,quicktunnel,serviceportal,sshd,syncthing"
fi

for i in "$@"; do
Expand Down
6 changes: 3 additions & 3 deletions build/COPY_ROOT_0/opt/ai-dock/fastapi/serviceportal/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,12 @@ def get_index_context(request, message=None):
"message": message,
"request": request,
"page": "index",
"auth_token": request.cookies.get("ai_dock_token"),
"auth_token": request.cookies.get(os.environ.get('CADDY_AUTH_COOKIE_NAME')),
"services": services,
"urlslug": os.environ.get('IMAGE_SLUG'),
"direct_address": os.environ.get('DIRECT_ADDRESS'),
'quicktunnels': False if os.environ.get('CF_QUICK_TUNNELS') == "false" else True,
'namedtunnels': True if os.environ.get('SUPERVISOR_START_CLOUDFLARED') == "1" else False
'quicktunnels': False if os.environ.get('CF_QUICK_TUNNELS').lower() == "false" else True,
'namedtunnels': False if not os.environ.get('CF_TUNNEL_TOKEN') else True
}

@app.get("/namedtunnel/{port}")
Expand Down

0 comments on commit 3025a4b

Please sign in to comment.