1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-11-08 19:26:48 +00:00

fix(docker): the console goes through nginx, and port 6080 is no longer published

This commit is contained in:
catborise 2026-10-07 17:56:56 +03:00
parent 0108866b32
commit 6031a7d3fb
4 changed files with 18 additions and 4 deletions

View file

@ -152,3 +152,11 @@ jobs:
- name: Import Compiled Dependencies
run: docker exec wvc /srv/webvirtcloud/venv/bin/python3 -c "import libvirt, ldap, lxml.etree, psycopg, sass"
# The browser reaches the console through nginx on the panel's port
- name: Console Through Nginx Only
run: |
[ "$(docker inspect -f '{{json .Config.ExposedPorts}}' webvirtcloud:ci)" = '{"80/tcp":{}}' ]
docker exec wvc grep -qx 'WS_PUBLIC_PORT = 80' /srv/webvirtcloud/webvirtcloud/settings.py
code=$(curl -s -m 5 -o /dev/null -w '%{http_code}' -H 'Connection: Upgrade' -H 'Upgrade: websocket' \
-H 'Sec-WebSocket-Version: 13' -H 'Sec-WebSocket-Key: dGVzdGtleXRlc3RrZXk9PQ==' http://127.0.0.1:8080/novncd/ || true)
[ "$code" = 101 ] || { echo "websocket upgrade through nginx: $code"; exit 1; }