Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion deepwell/src/services/caddy/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ fn write_test_file(path: &str, caddyfile: &str) {
#[test]
fn generate_caddyfiles() {
const FRAMERAIL_HOST: &str = "framerail:3393";
const WWS_HOST: &str = "wws:7000";
const WWS_HOST: &str = "wws:3466";

// Build different configurations for various test cases
let config_basic = build_config("wikijump.test", "wjfiles.test");
Expand Down
10 changes: 5 additions & 5 deletions deepwell/test/caddy/Caddyfile.basic_local
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
path /-/health-check
}
request_header @proxy X-Wikijump-Target-Server main
reverse_proxy @proxy wws:7000
reverse_proxy @proxy wws:3466

# Redirect, true route is on the files server
@redirect {
Expand Down Expand Up @@ -109,14 +109,14 @@ www.example.com {

# Reverse proxy
request_header X-Wikijump-Target-Server files
reverse_proxy wws:7000
reverse_proxy wws:3466
}

wjfiles.localhost {
import strip_headers
request_header X-Wikijump-Basic-Error 1
rewrite * /-/basic-error/file-root
reverse_proxy wws:7000
reverse_proxy wws:3466
}

*.wjfiles.localhost {
Expand Down Expand Up @@ -144,7 +144,7 @@ wjfiles.localhost {
request_header X-Wikijump-Basic-Error 1
request_header X-Wikijump-Site-Slug {labels.2}
rewrite * /-/basic-error/site-slug
reverse_proxy wws:7000
reverse_proxy wws:3466
}

# Missing custom domain
Expand All @@ -154,5 +154,5 @@ localhost {
import strip_headers
request_header X-Wikijump-Basic-Error 1
rewrite * /-/basic-error/site-custom
reverse_proxy wws:7000
reverse_proxy wws:3466
}
10 changes: 5 additions & 5 deletions deepwell/test/caddy/Caddyfile.basic_localdev
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
path /-/health-check
}
request_header @proxy X-Wikijump-Target-Server main
reverse_proxy @proxy wws:7000
reverse_proxy @proxy wws:3466

# Redirect, true route is on the files server
@redirect {
Expand Down Expand Up @@ -112,14 +112,14 @@ www.example.com {

# Reverse proxy
request_header X-Wikijump-Target-Server files
reverse_proxy wws:7000
reverse_proxy wws:3466
}

wjfiles.localhost {
import strip_headers
request_header X-Wikijump-Basic-Error 1
rewrite * /-/basic-error/file-root
reverse_proxy wws:7000
reverse_proxy wws:3466
}

*.wjfiles.localhost {
Expand Down Expand Up @@ -147,7 +147,7 @@ wjfiles.localhost {
request_header X-Wikijump-Basic-Error 1
request_header X-Wikijump-Site-Slug {labels.2}
rewrite * /-/basic-error/site-slug
reverse_proxy wws:7000
reverse_proxy wws:3466
}

# Missing custom domain
Expand All @@ -157,5 +157,5 @@ localhost {
import strip_headers
request_header X-Wikijump-Basic-Error 1
rewrite * /-/basic-error/site-custom
reverse_proxy wws:7000
reverse_proxy wws:3466
}
10 changes: 5 additions & 5 deletions deepwell/test/caddy/Caddyfile.basic_prod
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
path /-/health-check
}
request_header @proxy X-Wikijump-Target-Server main
reverse_proxy @proxy wws:7000
reverse_proxy @proxy wws:3466

# Redirect, true route is on the files server
@redirect {
Expand Down Expand Up @@ -107,14 +107,14 @@ www.example.com {

# Reverse proxy
request_header X-Wikijump-Target-Server files
reverse_proxy wws:7000
reverse_proxy wws:3466
}

wjfiles.test {
import strip_headers
request_header X-Wikijump-Basic-Error 1
rewrite * /-/basic-error/file-root
reverse_proxy wws:7000
reverse_proxy wws:3466
}

*.wjfiles.test {
Expand Down Expand Up @@ -142,7 +142,7 @@ wjfiles.test {
request_header X-Wikijump-Basic-Error 1
request_header X-Wikijump-Site-Slug {labels.2}
rewrite * /-/basic-error/site-slug
reverse_proxy wws:7000
reverse_proxy wws:3466
}

# Missing custom domain
Expand All @@ -151,5 +151,5 @@ https:// {
import strip_headers
request_header X-Wikijump-Basic-Error 1
rewrite * /-/basic-error/site-custom
reverse_proxy wws:7000
reverse_proxy wws:3466
}
10 changes: 5 additions & 5 deletions deepwell/test/caddy/Caddyfile.basic_prod_http
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
path /-/health-check
}
request_header @proxy X-Wikijump-Target-Server main
reverse_proxy @proxy wws:7000
reverse_proxy @proxy wws:3466

# Redirect, true route is on the files server
@redirect {
Expand Down Expand Up @@ -109,14 +109,14 @@ www.example.com {

# Reverse proxy
request_header X-Wikijump-Target-Server files
reverse_proxy wws:7000
reverse_proxy wws:3466
}

wjfiles.test {
import strip_headers
request_header X-Wikijump-Basic-Error 1
rewrite * /-/basic-error/file-root
reverse_proxy wws:7000
reverse_proxy wws:3466
}

*.wjfiles.test {
Expand Down Expand Up @@ -144,7 +144,7 @@ wjfiles.test {
request_header X-Wikijump-Basic-Error 1
request_header X-Wikijump-Site-Slug {labels.2}
rewrite * /-/basic-error/site-slug
reverse_proxy wws:7000
reverse_proxy wws:3466
}

# Missing custom domain
Expand All @@ -153,5 +153,5 @@ https:// {
import strip_headers
request_header X-Wikijump-Basic-Error 1
rewrite * /-/basic-error/site-custom
reverse_proxy wws:7000
reverse_proxy wws:3466
}
10 changes: 5 additions & 5 deletions deepwell/test/caddy/Caddyfile.full_prod
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
path /-/health-check
}
request_header @proxy X-Wikijump-Target-Server main
reverse_proxy @proxy wws:7000
reverse_proxy @proxy wws:3466

# Redirect, true route is on the files server
@redirect {
Expand Down Expand Up @@ -198,14 +198,14 @@ www.scpwiki.wikijump.test {

# Reverse proxy
request_header X-Wikijump-Target-Server files
reverse_proxy wws:7000
reverse_proxy wws:3466
}

wjfiles.test {
import strip_headers
request_header X-Wikijump-Basic-Error 1
rewrite * /-/basic-error/file-root
reverse_proxy wws:7000
reverse_proxy wws:3466
}

*.wjfiles.test {
Expand Down Expand Up @@ -242,7 +242,7 @@ wjfiles.test {
request_header X-Wikijump-Basic-Error 1
request_header X-Wikijump-Site-Slug {labels.2}
rewrite * /-/basic-error/site-slug
reverse_proxy wws:7000
reverse_proxy wws:3466
}

# Missing custom domain
Expand All @@ -251,5 +251,5 @@ https:// {
import strip_headers
request_header X-Wikijump-Basic-Error 1
rewrite * /-/basic-error/site-custom
reverse_proxy wws:7000
reverse_proxy wws:3466
}
10 changes: 5 additions & 5 deletions deepwell/test/caddy/Caddyfile.long
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
path /-/health-check
}
request_header @proxy X-Wikijump-Target-Server main
reverse_proxy @proxy wws:7000
reverse_proxy @proxy wws:3466

# Redirect, true route is on the files server
@redirect {
Expand Down Expand Up @@ -107,14 +107,14 @@ www.example.com {

# Reverse proxy
request_header X-Wikijump-Target-Server files
reverse_proxy wws:7000
reverse_proxy wws:3466
}

wjfiles.host.site.somedomain.example.com {
import strip_headers
request_header X-Wikijump-Basic-Error 1
rewrite * /-/basic-error/file-root
reverse_proxy wws:7000
reverse_proxy wws:3466
}

*.wjfiles.host.site.somedomain.example.com {
Expand Down Expand Up @@ -142,7 +142,7 @@ wjfiles.host.site.somedomain.example.com {
request_header X-Wikijump-Basic-Error 1
request_header X-Wikijump-Site-Slug {labels.3}
rewrite * /-/basic-error/site-slug
reverse_proxy wws:7000
reverse_proxy wws:3466
}

# Missing custom domain
Expand All @@ -151,5 +151,5 @@ https:// {
import strip_headers
request_header X-Wikijump-Basic-Error 1
rewrite * /-/basic-error/site-custom
reverse_proxy wws:7000
reverse_proxy wws:3466
}
2 changes: 1 addition & 1 deletion install/common/wws/health-check.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/sh
curl -If http://localhost:7000/-/health-check
curl -If http://localhost:3466/-/health-check
2 changes: 1 addition & 1 deletion install/dev/caddy/request.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
"local": false,
"auto_https": false,
"framerail_host": "framerail:3393",
"wws_host": "wws:7000"
"wws_host": "wws:3466"
}
}
4 changes: 2 additions & 2 deletions install/dev/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ services:
wws:
image: 575596218155.dkr.ecr.us-east-2.amazonaws.com/wikijump/wws
ports:
- "7000:7000"
- "3466:3466"
networks:
- dokploy-network
links:
- deepwell
environment:
- "ADDRESS=[::]:7000"
- "ADDRESS=[::]:3466"
- "DEEPWELL_URL=http://deepwell:2747"
- "REDIS_URL=${REDIS_URL}"
- "S3_FILES_BUCKET=${S3_FILES_BUCKET}"
Expand Down
2 changes: 1 addition & 1 deletion install/dev/wws/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ COPY --from=rust /src/wws/target/release/wws /usr/local/bin/wws
COPY ./install/dev/wws/health-check.sh /usr/local/bin/wikijump-health-check

USER daemon
EXPOSE 7000
EXPOSE 3466
CMD ["/usr/local/bin/wws"]
2 changes: 1 addition & 1 deletion install/local/caddy/request.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"debug": false,
"local": true,
"framerail_host": "framerail:3393",
"wws_host": "wws:7000"
"wws_host": "wws:3466"
}
}
4 changes: 2 additions & 2 deletions install/local/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,13 @@ services:
context: ../..
dockerfile: install/local/wws/Dockerfile
ports:
- "7000:7000"
- "3466:3466"
links:
- deepwell
- cache
- files
environment:
- "ADDRESS=[::]:7000"
- "ADDRESS=[::]:3466"
- "DEEPWELL_URL=http://deepwell:2747"
- "REDIS_URL=redis://cache"
- "S3_FILES_BUCKET=deepwell-files"
Expand Down
2 changes: 1 addition & 1 deletion install/local/wws/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ RUN mkdir /src
COPY ./wws /src/wws
WORKDIR /src/wws

EXPOSE 7000
EXPOSE 3466
CMD ["/usr/local/bin/wikijump-wws-start"]
2 changes: 1 addition & 1 deletion install/prod/caddy/request.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"debug": false,
"local": false,
"framerail_host": "framerail:3393",
"wws_host": "wws:7000"
"wws_host": "wws:3466"
}
}
2 changes: 1 addition & 1 deletion install/prod/wws/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ COPY --from=rust /src/wws/target/release/wws /usr/local/bin/wws
COPY ./install/prod/wws/health-check.sh /usr/local/bin/wikijump-health-check

USER daemon
EXPOSE 7000
EXPOSE 3466
CMD ["/usr/local/bin/wws"]
2 changes: 1 addition & 1 deletion wws/src/config/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ impl Default for Arguments {
enable_trace: true,
enable_deepwell_check: true,
pid_file: None,
address: "[::]:7000".parse().unwrap(),
address: "[::]:3466".parse().unwrap(),
}
}
}
Expand Down