mirror of
https://github.com/TecharoHQ/anubis.git
synced 2026-02-09 05:19:24 -06:00
test(caddy): fix automated testing
Signed-off-by: Xe Iaso <me@xeiaso.net>
This commit is contained in:
@@ -21,7 +21,8 @@
|
||||
"golang.go",
|
||||
"unifiedjs.vscode-mdx",
|
||||
"a-h.templ",
|
||||
"redhat.vscode-yaml"
|
||||
"redhat.vscode-yaml",
|
||||
"matthewpi.caddyfile-support"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
3
.vscode/extensions.json
vendored
3
.vscode/extensions.json
vendored
@@ -5,6 +5,7 @@
|
||||
"golang.go",
|
||||
"unifiedjs.vscode-mdx",
|
||||
"a-h.templ",
|
||||
"redhat.vscode-yaml"
|
||||
"redhat.vscode-yaml",
|
||||
"matthewpi.caddyfile-support"
|
||||
]
|
||||
}
|
||||
@@ -1,12 +1,5 @@
|
||||
:80 {
|
||||
reverse_proxy http://anubis:3000 {
|
||||
header_up X-Real-Ip {remote_host}
|
||||
header_up X-Http-Version {http.request.proto}
|
||||
}
|
||||
}
|
||||
|
||||
:443 {
|
||||
tls /etc/techaro/pki/caddy.local.cetacean.club/cert.pem /etc/techaro/pki/caddy.local.cetacean.club/key.pem
|
||||
caddy.local.cetacean.club {
|
||||
tls internal
|
||||
|
||||
reverse_proxy http://anubis:3000 {
|
||||
header_up X-Real-Ip {remote_host}
|
||||
|
||||
@@ -5,8 +5,6 @@ services:
|
||||
ports:
|
||||
- 8080:80
|
||||
- 8443:443
|
||||
volumes:
|
||||
- "../pki/caddy.local.cetacean.club:/etc/techaro/pki/caddy.local.cetacean.club/"
|
||||
|
||||
anubis:
|
||||
image: ko.local/anubis
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
async function testWithUserAgent(userAgent) {
|
||||
const statusCode =
|
||||
await fetch("https://relayd.local.cetacean.club:8443/reqmeta", {
|
||||
await fetch("https://caddy.local.cetacean.club:8443/reqmeta", {
|
||||
headers: {
|
||||
"User-Agent": userAgent,
|
||||
}
|
||||
|
||||
@@ -10,4 +10,6 @@ docker compose up -d --build
|
||||
|
||||
export NODE_TLS_REJECT_UNAUTHORIZED=0
|
||||
|
||||
sleep 2
|
||||
|
||||
backoff-retry node test.mjs
|
||||
|
||||
@@ -14,7 +14,7 @@ trap cleanup EXIT SIGINT
|
||||
function build_anubis_ko() {
|
||||
(
|
||||
cd ../.. &&
|
||||
VERSION=devel ko build \
|
||||
KO_DOCKER_REPO=ko.local/anubis VERSION=devel ko build \
|
||||
--platform=all \
|
||||
--base-import-paths \
|
||||
--tags="latest" \
|
||||
|
||||
Reference in New Issue
Block a user