From 4769661db1a7927f2ef8eea97fbc2fde7ad091ce Mon Sep 17 00:00:00 2001 From: Nikola Sibalic Date: Sun, 19 Jan 2025 19:06:33 +0100 Subject: [PATCH] restructure repo: server is now separate folder --- Dockerfile_proxy | 3 +-- build_containers.sh | 2 +- caroline/html/index.html | 2 +- caroline/html/init_data.yaml | 1 + caroline/html/package.json | 3 ++- roundtable.conf | 4 ++-- {caroline/server => server}/.python-version | 0 {caroline/server => server}/Dockerfile | 0 {caroline/server => server}/caroline_relay_server.py | 0 {caroline/server => server}/pyproject.toml | 0 {caroline/server => server}/uv.lock | 0 11 files changed, 8 insertions(+), 7 deletions(-) rename {caroline/server => server}/.python-version (100%) rename {caroline/server => server}/Dockerfile (100%) rename {caroline/server => server}/caroline_relay_server.py (100%) rename {caroline/server => server}/pyproject.toml (100%) rename {caroline/server => server}/uv.lock (100%) diff --git a/Dockerfile_proxy b/Dockerfile_proxy index 7b44896..119f983 100644 --- a/Dockerfile_proxy +++ b/Dockerfile_proxy @@ -1,4 +1,3 @@ FROM nginx -COPY caroline/html_dist /usr/share/nginx/html/caroline/ -COPY caroline/html_dist/index.html /usr/share/nginx/html/. +COPY caroline/html/caroline/ /usr/share/nginx/html/caroline/ COPY roundtable.conf /etc/nginx/conf.d/default.conf \ No newline at end of file diff --git a/build_containers.sh b/build_containers.sh index 1d31692..af70aa7 100644 --- a/build_containers.sh +++ b/build_containers.sh @@ -4,4 +4,4 @@ echo "Build proxy image" podman build -f Dockerfile_proxy -t roundtable_proxy echo "Build application server" -podman build -f caroline/server/Dockerfile -t roundtable_application \ No newline at end of file +podman build -f server/Dockerfile -t roundtable_application \ No newline at end of file diff --git a/caroline/html/index.html b/caroline/html/index.html index f346ca5..5572e52 100644 --- a/caroline/html/index.html +++ b/caroline/html/index.html @@ -205,7 +205,7 @@

import { initRoundTable, initApp, enabaleProceed, disableProceed } from './js/caroline.js'; import YAML from 'yaml'; - var initDataLocation = './init_data.yaml'; + var initDataLocation = './caroline/init_data.yaml'; const queryString = window.location.search; const urlParams = new URLSearchParams(queryString); if (urlParams.has('load')){ diff --git a/caroline/html/init_data.yaml b/caroline/html/init_data.yaml index 13b48a8..e537971 100644 --- a/caroline/html/init_data.yaml +++ b/caroline/html/init_data.yaml @@ -9,6 +9,7 @@ leftHanded: false drawingHelp: dots drawingHelpIntensity: 0.06 roundTableCallBack: +#roundTableServer: http://localhost:8001 roundTableServer: https://roundtable.researchx3d.com/ roundTableAuth: '' roundTableExit: diff --git a/caroline/html/package.json b/caroline/html/package.json index c85e691..9548584 100644 --- a/caroline/html/package.json +++ b/caroline/html/package.json @@ -6,7 +6,8 @@ "build": "parcel build --no-scope-hoist --public-url ../caroline --dist-dir ./caroline/" }, "staticFiles": { - "staticPath": "./init_data.yaml" + "staticPath": "./init_data.yaml", + "outputDir": "/caroline" }, "devDependencies": { "@parcel/compressor-brotli": "^2.13.3", diff --git a/roundtable.conf b/roundtable.conf index d158227..ba497e1 100644 --- a/roundtable.conf +++ b/roundtable.conf @@ -12,10 +12,10 @@ server { gzip_vary on; gzip_min_length 10240; gzip_types text/css text/javascript application/x-javascript; - + gzip_static on; location / { - index index.html; + index caroline/index.html; gzip on; gzip_types application/json; gzip_static on; diff --git a/caroline/server/.python-version b/server/.python-version similarity index 100% rename from caroline/server/.python-version rename to server/.python-version diff --git a/caroline/server/Dockerfile b/server/Dockerfile similarity index 100% rename from caroline/server/Dockerfile rename to server/Dockerfile diff --git a/caroline/server/caroline_relay_server.py b/server/caroline_relay_server.py similarity index 100% rename from caroline/server/caroline_relay_server.py rename to server/caroline_relay_server.py diff --git a/caroline/server/pyproject.toml b/server/pyproject.toml similarity index 100% rename from caroline/server/pyproject.toml rename to server/pyproject.toml diff --git a/caroline/server/uv.lock b/server/uv.lock similarity index 100% rename from caroline/server/uv.lock rename to server/uv.lock