Unverified Commit 1f4d5850 authored by Kroese's avatar Kroese Committed by GitHub
Browse files

feat: Switch to port 80 (#698)

parent 0b764ff8
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@ RUN set -eu && \
        tini \
        wget \
        7zip \
        curl \
        ovmf \
        nginx \
        swtpm \
@@ -50,7 +51,7 @@ COPY --chmod=664 ./web/conf/mandatory.json /usr/share/novnc
COPY --chmod=744 ./web/conf/nginx.conf /etc/nginx/sites-enabled/web.conf

VOLUME /storage
EXPOSE 22 5900 8006
EXPOSE 22 80 5900

ENV CPU_CORES="1"
ENV RAM_SIZE="1G"
+1 −1
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@ services:
    cap_add:
      - NET_ADMIN
    ports:
      - 8006:8006
      - 8006:80
    volumes:
      - ./qemu:/storage
    restart: always
+1 −1
Original line number Diff line number Diff line
@@ -76,7 +76,7 @@ spec:
    - name: http
      port: 8006
      protocol: TCP
      targetPort: 8006
      targetPort: 80
    - name: vnc
      port: 5900
      protocol: TCP
+2 −2
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@ services:
    cap_add:
      - NET_ADMIN
    ports:
      - 8006:8006
      - 8006:80
    volumes:
      - ./qemu:/storage
    restart: always
@@ -48,7 +48,7 @@ services:
Via Docker CLI:

```bash
docker run -it --rm --name qemu -e "BOOT=alpine" -p 8006:8006 --device=/dev/kvm --device=/dev/net/tun --cap-add NET_ADMIN -v ${PWD:-.}/qemu:/storage --stop-timeout 120 qemux/qemu
docker run -it --rm --name qemu -e "BOOT=alpine" -p 8006:80 --device=/dev/kvm --device=/dev/net/tun --cap-add NET_ADMIN -v ${PWD:-.}/qemu:/storage --stop-timeout 120 qemux/qemu
```

Via Kubernetes:
+23 −2
Original line number Diff line number Diff line
#!/usr/bin/env bash
set -Eeuo pipefail

pipe() {
  local code="99"
  msg="Failed to connect to $1, reason:"

  curl --disable --silent --max-time 10 --fail --location "${1}" || {
    code="$?"
  }

  case "${code,,}" in
    "6" ) error "$msg could not resolve host!" ;;
    "7" ) error "$msg no internet connection available!" ;;
    "28" ) error "$msg connection timed out!" ;;
    "99" ) return 0 ;;
    *) error "$msg $code" ;;
  esac

  return 1
}

getURL() {
  local id="${1/ /}"
  local ret="$2"
@@ -29,8 +48,10 @@ getURL() {
      arm="https://mirrors.xtom.de/centos-stream/10-stream/BaseOS/aarch64/iso/CentOS-Stream-10-latest-aarch64-dvd1.iso" ;;
    "debian" )
      name="Debian"
      url="https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid/debian-live-12.10.0-amd64-standard.iso"
      arm="https://cdimage.debian.org/debian-cd/current/arm64/iso-dvd/debian-12.10.0-arm64-DVD-1.iso" ;;
      version=$(pipe "https://cdimage.debian.org/debian-cd/") || exit 65
      version=$(echo "$version" | grep '\.[0-9]/' | cut -d'>' -f 9 | cut -d'/' -f 1)
      url="https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid/debian-live-$version-amd64-standard.iso"
      arm="https://cdimage.debian.org/debian-cd/current/arm64/iso-dvd/debian-$version-arm64-DVD-1.iso" ;;
    "endeavour" | "endeavouros" )
      name="EndeavourOS"
      url="https://mirrors.gigenet.com/endeavouros/iso/EndeavourOS_Mercury-2025.02.08.iso" ;;