diff --git a/Dockerfile b/Dockerfile index 211d10c..2c2963b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -32,11 +32,14 @@ RUN apt-get update \ && sed -i 's/^worker_processes.*/worker_processes 1;/' /etc/nginx/nginx.conf \ && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* -COPY ./src /run/ -COPY ./web /var/www/ +ADD https://raw.githubusercontent.com/qemus/qemu-docker/master/web/index.html /var/www/index.html +ADD https://raw.githubusercontent.com/qemus/qemu-docker/master/web/js/script.js /var/www/js/script.js +ADD https://raw.githubusercontent.com/qemus/qemu-docker/master/web/css/style.css /var/www/css/style.css +ADD https://raw.githubusercontent.com/qemus/qemu-docker/master/web/img/favicon.svg /var/www/img/favicon.svg +ADD https://raw.githubusercontent.com/qemus/qemu-docker/master/web/nginx.conf /etc/nginx/sites-enabled/web.conf +COPY ./src /run/ RUN chmod +x /run/*.sh -RUN mv /var/www/nginx.conf /etc/nginx/sites-enabled/web.conf VOLUME /storage EXPOSE 22 5900 8006 diff --git a/web/css/style.css b/web/css/style.css deleted file mode 100644 index 20960f1..0000000 --- a/web/css/style.css +++ /dev/null @@ -1,167 +0,0 @@ -body { - color: white; - background-color: #125bdb; - font-smoothing: antialiased; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - font-family: Verdana, Geneva, sans-serif; -} - -#info { - text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.25); -} - -#content { - text-align: center; - padding: 20px; - margin-top: 50px; -} - -footer { - width: 98%; - position: fixed; - bottom: 0px; - height: 40px; - text-align: center; - color: #0c8aeb; - text-shadow: 0 0 1px #0c8aeb; -} - -#empty { - height: 40px; - /* Same height as footer */ -} - -a, -a:hover, -a:active, -a:visited { - color: white; -} - -footer a:link, -footer a:visited, -footer a:active { - color: #0c8aeb; -} - -footer a:hover { - color: #73e6ff; -} - -.loading:after { - content: " ."; - animation: dots 1s steps(5, end) infinite; -} - -@keyframes dots { - - 0%, - 20% { - color: rgba(0, 0, 0, 0); - text-shadow: 0.25em 0 0 rgba(0, 0, 0, 0), 0.5em 0 0 rgba(0, 0, 0, 0); - } - - 40% { - color: white; - text-shadow: 0.25em 0 0 rgba(0, 0, 0, 0), 0.5em 0 0 rgba(0, 0, 0, 0); - } - - 60% { - text-shadow: 0.25em 0 0 white, 0.5em 0 0 rgba(0, 0, 0, 0); - } - - 80%, - 100% { - text-shadow: 0.25em 0 0 white, 0.5em 0 0 white; - } -} - -.spinner_LWk7 { - animation: spinner_GWy6 1.2s linear infinite, spinner_BNNO 1.2s linear infinite -} - -.spinner_yOMU { - animation: spinner_GWy6 1.2s linear infinite, spinner_pVqn 1.2s linear infinite; - animation-delay: .15s -} - -.spinner_KS4S { - animation: spinner_GWy6 1.2s linear infinite, spinner_6uKB 1.2s linear infinite; - animation-delay: .3s -} - -.spinner_zVee { - animation: spinner_GWy6 1.2s linear infinite, spinner_Qw4x 1.2s linear infinite; - animation-delay: .45s -} - -@keyframes spinner_GWy6 { - - 0%, - 50% { - width: 9px; - height: 9px - } - - 10% { - width: 11px; - height: 11px - } -} - -@keyframes spinner_BNNO { - - 0%, - 50% { - x: 1.5px; - y: 1.5px - } - - 10% { - x: .5px; - y: .5px - } -} - -@keyframes spinner_pVqn { - - 0%, - 50% { - x: 13.5px; - y: 1.5px - } - - 10% { - x: 12.5px; - y: .5px - } -} - -@keyframes spinner_6uKB { - - 0%, - 50% { - x: 13.5px; - y: 13.5px - } - - 10% { - x: 12.5px; - y: 12.5px - } -} - -@keyframes spinner_Qw4x { - - 0%, - 50% { - x: 1.5px; - y: 13.5px - } - - 10% { - x: .5px; - y: 12.5px - } -} diff --git a/web/img/favicon.svg b/web/img/favicon.svg deleted file mode 100644 index 47d83d3..0000000 --- a/web/img/favicon.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/web/index.html b/web/index.html deleted file mode 100644 index 0f10e13..0000000 --- a/web/index.html +++ /dev/null @@ -1,34 +0,0 @@ - - - -
- [1] - - - - - [2] - - - -" + msg + "
"; - } - - el = document.getElementById("info"); - - if (el.innerHTML != msg) { - el.innerHTML = msg; - } - - return true; - - } catch (e) { - console.log("Error: " + e.message); - return false; - } -} - -function setError(text) { - return setInfo(text, false, true); -} - -function schedule() { - setTimeout(getInfo, interval); -} - -function reload() { - setTimeout(() => { - document.location.reload(); - }, 3000); -} - -schedule(); diff --git a/web/nginx.conf b/web/nginx.conf deleted file mode 100644 index 7ea33dc..0000000 --- a/web/nginx.conf +++ /dev/null @@ -1,64 +0,0 @@ -server { - - listen 80; - listen [::]:80; - listen 8006 default_server; - listen [::]:8006 default_server; - - autoindex on; - tcp_nodelay on; - server_tokens off; - absolute_redirect off; - - error_log /dev/null; - access_log /dev/null; - - include /etc/nginx/mime.types; - - 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"; - - location / { - - root /run/shm; - - if ( -f /run/shm/index.html) { - break; - } - - try_files /index.html @vnc; - } - - location @vnc { - - root /usr/share/novnc; - index vnc.html; - - if ($request_uri = "/") { - return 301 /?resize=scale&autoconnect=true; - } - - } - - location /websockify { - - proxy_http_version 1.1; - - proxy_set_header Connection 'upgrade'; - proxy_set_header Upgrade $http_upgrade; - - proxy_buffering off; - proxy_read_timeout 3600s; - proxy_send_timeout 3600s; - - proxy_pass http://127.0.0.1:5700/; - } - -}