diff --git a/Dockerfile b/Dockerfile index 58276be..1b679a5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ FROM docker.io/ubuntu:20.04 LABEL maintainer="Jake Jarvis " LABEL repository="https://github.com/jakejarvis/y2k" -LABEL homepage="https://y2k.app/" +LABEL homepage="https://jarv.is/y2k/" ARG DEBIAN_FRONTEND=noninteractive diff --git a/README.md b/README.md index dbb5b08..e8936ea 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ -# 💾 [Y2K Sandbox](https://y2k.app/) [![Uptime Robot status](https://img.shields.io/uptimerobot/status/m785127956-49458d510e68142930db872d?logo=windows%2095)](https://y2k.app/) [![Uptime Robot ratio (7 days)](https://img.shields.io/uptimerobot/ratio/7/m785127956-49458d510e68142930db872d?color=%23638ebd&logo=zeit)](https://status.jrvs.io/785127956/check/597930) +# 💾 [Y2K Sandbox](https://jarv.is/y2k/) [![Uptime Robot status](https://img.shields.io/uptimerobot/status/m785127956-49458d510e68142930db872d?logo=windows%2095)](https://jarv.is/y2k/) [![Uptime Robot ratio (7 days)](https://img.shields.io/uptimerobot/ratio/7/m785127956-49458d510e68142930db872d?color=%23638ebd)](https://status.pipe.fail/check/597930) Nostalgic time machine powered by on-demand Windows Me® VMs, [my first website](https://github.com/jakejarvis/my-first-website), and quarantine boredom. 📟 [**📝 Read the blog post here.**](https://jarv.is/notes/y2k-sandbox/) -

+

## Requirements diff --git a/build.sh b/build.sh index 7fcb059..677bce1 100755 --- a/build.sh +++ b/build.sh @@ -9,4 +9,5 @@ YOU_ARE_HERE="$(realpath "$(dirname "${BASH_SOURCE[0]}")")" test -f "$YOU_ARE_HERE"/container/hdd/hdd.img # build the container & tag it locally -docker build -t y2k:latest --squash --no-cache "$YOU_ARE_HERE" +docker build -t git.pipe.fail/jake/y2k:latest --squash --no-cache "$YOU_ARE_HERE" +docker push git.pipe.fail/jake/y2k:latest diff --git a/frontend/app.js b/frontend/app.js index 2f40b25..65c97c0 100644 --- a/frontend/app.js +++ b/frontend/app.js @@ -7,7 +7,7 @@ if (window.WebSocket) { // https://github.com/novnc/noVNC/blob/master/docs/API.md const rfb = new RFB( document.getElementById("display"), - "wss://socket.y2k.app", + "wss://y2k.pipe.fail", { wsProtocols: ["binary", "base64"] } diff --git a/frontend/package.json b/frontend/package.json index f7409b5..d381d14 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -6,6 +6,7 @@ "@novnc/novnc": "1.3.0" }, "devDependencies": { + "@types/novnc__novnc": "^1.3.0", "esbuild": "^0.13.14" } } diff --git a/frontend/public/404.html b/frontend/public/404.html index 36b3491..161c034 100644 --- a/frontend/public/404.html +++ b/frontend/public/404.html @@ -8,8 +8,7 @@ font-family: "Perfect DOS VGA 437"; font-style: normal; font-weight: normal; - src: url("/fonts/perfect-dos.woff2") format("woff2"), - url("/fonts/perfect-dos.woff") format("woff"); + src: url("/fonts/perfect-dos.woff2") format("woff2"), url("/fonts/perfect-dos.woff") format("woff"); } body { margin: 60px; @@ -41,12 +40,8 @@ a { color: inherit; text-decoration: none; } -p { - margin: 1em 0; -} -p:last-of-type { - text-align: center; -} +p { margin: 1em 0 } +p:last-of-type { text-align: center } ul { position: relative; list-style: none; @@ -62,9 +57,7 @@ span.blink { animation: blink 1s step-end infinite; } @keyframes blink { - 50% { - opacity: 0; - } + 50% { opacity: 0 } } diff --git a/frontend/public/index.html b/frontend/public/index.html index af0c826..ec669d9 100644 --- a/frontend/public/index.html +++ b/frontend/public/index.html @@ -8,20 +8,20 @@ --> - -Y2K Sandbox — Powered by Windows Me™ 💾 - - - + + Y2K Sandbox — Powered by Windows Me™ 💾 + + + -
JavaScript is required for this experience.

Please enable it and refresh the page!
_
-
- - - +
JavaScript is required for this experience.

Please enable it and refresh the page!
_
+
+ + + diff --git a/host/.cloudflared/config.yml b/host/.cloudflared/config.yml index ca13f4c..1b076dc 100644 --- a/host/.cloudflared/config.yml +++ b/host/.cloudflared/config.yml @@ -1,3 +1,5 @@ -hostname: socket.y2k.app +hostname: y2k.pipe.fail url: http://localhost:80 logfile: /var/log/cloudflared.log +tunnel: +credentials-file: diff --git a/host/install.sh b/host/install.sh index 1b147eb..f4b6d7f 100755 --- a/host/install.sh +++ b/host/install.sh @@ -53,9 +53,9 @@ websocketd --version #### install cloudflared #### ## https://developers.cloudflare.com/argo-tunnel/downloads/ -wget -nv -P /tmp/ https://bin.equinox.io/c/VdrWdbjqyF/cloudflared-stable-linux-amd64.deb -dpkg -i /tmp/cloudflared-stable-linux-amd64.deb -rm /tmp/cloudflared-stable-linux-amd64.deb +wget -nv -P /tmp/ https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb +dpkg -i /tmp/cloudflared-linux-amd64.deb +rm /tmp/cloudflared-linux-amd64.deb cloudflared version #### login to cloudflare #### @@ -66,15 +66,16 @@ cloudflared service install cp ~/.cloudflared/cert.pem /etc/cloudflared/ rm ~/.cloudflared/cert.pem +#### login to registry & pull existing OS container #### +docker login git.pipe.fail +docker pull git.pipe.fail/jake/y2k:latest + #### enable services #### cp $REPO_DIR/host/example.service /lib/systemd/system/y2k.service systemctl daemon-reload systemctl enable y2k systemctl enable cloudflared -#### build fresh docker image if ready #### -bash $REPO_DIR/build.sh || true - #### reboot #### echo "Rebooting shortly..." sleep 15 diff --git a/host/socket.sh b/host/socket.sh index 887bf37..fe0a460 100755 --- a/host/socket.sh +++ b/host/socket.sh @@ -1,13 +1,13 @@ #!/usr/bin/env bash REPO_DIR=/root/y2k -IMAGE_NAME=y2k:latest +IMAGE_NAME=git.pipe.fail/jake/y2k:latest $REPO_DIR/host/websocketd \ --port=80 \ --binary \ --header-ws="Sec-WebSocket-Protocol: binary" \ - --origin=y2k.app,www.y2k.app,y2k.pages.dev \ + --origin=jarv.is,www.jarv.is,y2k.pages.dev \ -- \ docker run \ --cpus 1 \