-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Replace websockify by nginx (#340)
- Loading branch information
Showing
6 changed files
with
94 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,20 @@ | ||
version: "3" | ||
services: | ||
qemu: | ||
container_name: qemu | ||
image: qemux/qemu-docker:latest | ||
environment: | ||
DISPLAY: "vnc" | ||
RAM_SIZE: "1G" | ||
CPU_CORES: "1" | ||
DISK_SIZE: "16G" | ||
BOOT: "https://dl-cdn.alpinelinux.org/alpine/v3.19/releases/x86_64/alpine-virt-3.19.0-x86_64.iso" | ||
devices: | ||
- /dev/kvm | ||
device_cgroup_rules: | ||
- 'c *:* rwm' | ||
cap_add: | ||
- NET_ADMIN | ||
ports: | ||
- 2222:22 | ||
- 5900:5900 | ||
stop_grace_period: 2m | ||
restart: unless-stopped | ||
qemu: | ||
container_name: qemu | ||
image: qemux/qemu-docker | ||
environment: | ||
RAM_SIZE: "1G" | ||
CPU_CORES: "1" | ||
DISK_SIZE: "16G" | ||
BOOT: "https://dl-cdn.alpinelinux.org/alpine/v3.19/releases/x86_64/alpine-virt-3.19.0-x86_64.iso" | ||
devices: | ||
- /dev/kvm | ||
device_cgroup_rules: | ||
- 'c *:* rwm' | ||
cap_add: | ||
- NET_ADMIN | ||
ports: | ||
- 8006:8006 | ||
stop_grace_period: 2m | ||
restart: unless-stopped |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
server { | ||
|
||
listen 8006 default_server; | ||
listen [::]:8006 default_server; | ||
|
||
autoindex on; | ||
server_name _; | ||
tcp_nodelay on; | ||
server_tokens off; | ||
|
||
error_log /dev/null; | ||
access_log /dev/null; | ||
|
||
include /etc/nginx/mime.types; | ||
|
||
location / { | ||
|
||
gzip on; | ||
gzip_vary on; | ||
gzip_proxied any; | ||
gzip_comp_level 5; | ||
gzip_min_length 500; | ||
gzip_disable "msie6"; | ||
gzip_types text/css text/javascript text/xml text/plain text/x-component application/javascript application/json application/xml application/rss+xml font/truetype font/opentype application/vnd.ms-fontobject image/svg+xml; | ||
|
||
add_header Cache-Control "no-cache"; | ||
|
||
root /usr/share/novnc; | ||
index vnc.html; | ||
|
||
if ($request_uri = "/") { | ||
return 301 /?resize=scale&autoconnect=true; | ||
} | ||
|
||
} | ||
|
||
location /websockify { | ||
|
||
proxy_pass http://127.0.0.1:5700/; | ||
proxy_http_version 1.1; | ||
proxy_set_header Upgrade $http_upgrade; | ||
proxy_set_header Connection 'upgrade'; | ||
proxy_read_timeout 61s; | ||
proxy_connect_timeout 61s; | ||
proxy_send_timeout 61s; | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters