How To
Disini saya hanya menggunakan 1 server untuk test Uncloud
Instal di laptop & server kamu
curl -fsS https://get.uncloud.run/install.sh | shJangan lupa buka port 80 & 443 di server.
Lalu inisialiasi dengan
uc machine init server-test, server-test ini alias server dari~/.ssh/configNanti kamu akan dapat output custom domain setelah selesai instalasi
DNS records updated to use only the internet-reachable machines running caddy service:
*.xxx.uncld.dev A → xxx.xxx.xxx.xx
Deploy speedtest image
uc run --name speedtest-ctr -p speedtest.xxx.uncld.dev:3000/https openspeedtest/latestKamu juga bisa setup header dan deploy dengan compose file, buat file whoami.yml
services:
whoami:
image: traefik/whoami
x-caddy: |
whoami.xxx.uncld.dev {
header {
x-robots-tag "noindex, nofollow, nosnippet, noarchive"
strict-transport-security "max-age=15552000; includeSubDomains; preload"
x-xss-protection "1; mode=block"
x-content-type-options "nosniff"
x-dns-prefetch-control "off"
x-download-options "noopen"
referrer-policy "no-referrer-when-downgrade"
permissions-policy "interest-cohort=()"
x-frame-options "SAMEORIGIN"
}
reverse_proxy {{upstreams 80}}
}
Deploy dengan
uc deploy -f whoami.ymlScale service dengan
uc service scale whoami 2Remove service
uc service rm speedtest-ctrCek log
uc logs whoami
Kelebihan
Instalasi mudah
Untuk yang terbiasa menggunakan docker, adaptasi tidak akan sulit
