Browse Source

more customisation

main 2.0.2
Stian Fredrik Aune 2 years ago
parent
commit
bfaeefc30f
  1. 4
      docker/frontend/default.conf.template
  2. 2
      webui-react/src/actions/runtime.ts
  3. 2
      ykonsole-ktor/src/main/kotlin/net/aiterp/git/ykonsole2/application/Server.kt

4
docker/frontend/default.conf.template

@ -1,5 +1,5 @@
server {
listen 80 default_server;
listen ${FRONTEND_PORT} default_server;
root /usr/share/nginx/html;
@ -10,7 +10,7 @@ server {
}
location /api {
proxy_pass http://ykonsole_backend:8080;
proxy_pass http://${BACKEND_HOST}:9301;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';

2
webui-react/src/actions/runtime.ts

@ -5,7 +5,7 @@ interface RuntimeRepository {
export default function runtimeRepo(): RuntimeRepository {
switch (import.meta.env.VITE_MODE) {
case "webapp":
const port = window.location.port !== "5173" ? window.location.port : "8080";
const port = window.location.port !== "5173" ? window.location.port : "9301";
return makeRuntimeRepo(`${window.location.hostname}:${port}`);
case "chrome-plugin":
return makeRuntimeRepo("127.0.0.1:9999");

2
ykonsole-ktor/src/main/kotlin/net/aiterp/git/ykonsole2/application/Server.kt

@ -26,7 +26,7 @@ fun createServer(
workoutStateRepo: WorkoutStateRepository,
commandBus: CommandBus,
eventBus: EventBus,
) = embeddedServer(Netty, port = 8080) {
) = embeddedServer(Netty, port = 9301) {
val log = YKonsoleServer.log
log.info("Starting YKonsole server...")

Loading…
Cancel
Save