diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..3c3314b --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "change-game"] + path = change-game + url = git@labs.scarif.space:chris/change-game diff --git a/change-game b/change-game new file mode 160000 index 0000000..5fd400c --- /dev/null +++ b/change-game @@ -0,0 +1 @@ +Subproject commit 5fd400c22c7b0a625584ffa0a356baa1faf3c819 diff --git a/change/Dockerfile b/change/Dockerfile deleted file mode 100644 index 996d9dc..0000000 --- a/change/Dockerfile +++ /dev/null @@ -1,10 +0,0 @@ -FROM alpine/git:latest -WORKDIR /change -RUN git clone git@labs.scarif.space/chris/change-game.git - -FROM node:alpine as base -WORKDIR /change -COPY package.json yarn.lock ./ -RUN rm -rf frontend/node_modules && yarn --cwd frontend install --frozen-lockfile && yarn --cwd frontend cache clean && yarn --cwd frontend build -RUN rm -rf backend/node_modules && yarn --cwd backend install --frozen-lockfile && yarn --cwd backend cache clean -COPY . . diff --git a/docker-compose.yml b/docker-compose.yml index afbf0a6..cff3a0f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -13,6 +13,12 @@ x-logging: &logging max-file: "2" services: + change: + container_name: change + image: node:alpine + build: ./change-game + environment: + - PORT=9000 foundry: <<: *logging image: felddy/foundryvtt:release @@ -74,7 +80,7 @@ services: extra_hosts: - "tower.${DOMAIN}:${LOCAL_IP}" - "office.${DOMAIN}:${LOCAL_IP}" - + collabora: <<: *logging image: collabora/code diff --git a/nginx/nginx.conf.template b/nginx/nginx.conf.template index 7032387..07b01d7 100644 --- a/nginx/nginx.conf.template +++ b/nginx/nginx.conf.template @@ -361,6 +361,10 @@ http { server foundry:30000; } + upstream change-handler { + server change:9000; + } + server { listen 443 ssl http2; @@ -384,6 +388,20 @@ http { proxy_pass http://foundry-handler; } + + location /change { + + # Set proxy headers + proxy_set_header Host $host; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + + # These are important to support WebSockets; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "Upgrade"; + + proxy_pass http://change-handler; + } } upstream pihole-handler {