fix nginx loader

This commit is contained in:
Simon Larsen 2022-06-13 22:50:04 +01:00
parent f58dc1bc6b
commit adebcee48e
No known key found for this signature in database
GPG Key ID: AB45983AA9C81CDE
9 changed files with 18 additions and 98 deletions

View File

@ -54,7 +54,9 @@ COPY ./Accounts/package-lock.json /usr/src/app/package-lock.json
# Install app dependencies
RUN npm install
RUN npm link ../CommonUI/node_modules/react
RUN npm link ../CommonUI/node_modules/react-dom
RUN npm link ../CommonUI/node_modules/react-router-dom
# Create .cache folder with necessary permissions for React-based apps
# https://stackoverflow.com/questions/67087735/eacces-permission-denied-mkdir-usr-app-node-modules-cache-how-can-i-creat
RUN mkdir -p node_modules/.cache && chmod -R 777 node_modules/.cache

View File

@ -22,7 +22,7 @@
"compile": "tsc",
"start": "node index.ts",
"audit": "npm audit --audit-level=low",
"preinstall": "npm link ../CommonUI/node_modules/react && npx npm-force-resolutions || echo 'No package-lock.json file. Skipping force resolutions'",
"preinstall": "npx npm-force-resolutions || echo 'No package-lock.json file. Skipping force resolutions'",
"dep-check": "depcheck ./ --skip-missing=true'"
},
"browserslist": {

View File

@ -64,7 +64,7 @@
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
<script src="/accounts/assets/bundle.js"></script>
</body>

View File

@ -6,6 +6,7 @@ import FormValues from 'CommonUI/src/Components/Forms/Types/FormValues';
import Footer from '../Footer';
import Container from 'CommonUI/src/Container';
import IdentityAPI from 'CommonUI/src/Utils/API/IdentityAPI';
import Route from 'Common/Types/API/Route';
import { JSONObject } from 'Common/Types/JSON';
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';

View File

@ -19,7 +19,7 @@ module.exports = {
output: {
filename: "bundle.js",
path: path.resolve(__dirname, "dist"),
publicPath: "/accounts/assets/",
publicPath: "//assets/",
},
resolve: {
extensions: ['.ts', '.tsx', '.js', '.jsx', '.json', '.css', '.scss']

View File

@ -24,7 +24,7 @@
"compile": "tsc",
"start": "node index.ts",
"audit": "npm audit --audit-level=low",
"preinstall": "npm link ../CommonUI/node_modules/react && npx npm-force-resolutions || echo 'No package-lock.json file. Skipping force resolutions'",
"preinstall": "npx npm-force-resolutions || echo 'No package-lock.json file. Skipping force resolutions'",
"dep-check": "depcheck ./ --skip-missing=true'"
},
"browserslist": {

View File

@ -19,7 +19,7 @@ module.exports = {
output: {
filename: "bundle.js",
path: path.resolve(__dirname, "dist"),
publicPath: "/dashboard/assets/",
publicPath: "//assets/",
},
resolve: {
extensions: ['.ts', '.tsx', '.js', '.json', '.css', '.scss']

View File

@ -1,17 +1,17 @@
upstream accounts {
server accounts:3003;
server accounts:3003 weight=10 max_fails=3 fail_timeout=30s;
}
upstream identity {
server identity:3087;
server identity:3087 weight=10 max_fails=3 fail_timeout=30s;
}
upstream dashboard {
server dashboard:3009;
server dashboard:3009 weight=10 max_fails=3 fail_timeout=30s;
}
upstream home {
server home:1444;
server home:1444 weight=10 max_fails=3 fail_timeout=30s;
}
# upstream admin {
@ -62,7 +62,7 @@ server {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass http://home;
proxy_pass http://home/;
}
location /accounts {
@ -75,7 +75,7 @@ server {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass http://accounts;
proxy_pass http://accounts/;
}
location /dashboard {
@ -88,7 +88,7 @@ server {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass http://dashboard;
proxy_pass http://dashboard/;
}
location /identity {
@ -101,90 +101,6 @@ server {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass http://identity;
proxy_pass http://identity/;
}
# location /admin {
# proxy_set_header Host $host;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_set_header X-Forwarded-Proto $scheme;
# # enable WebSockets (for ws://sockjs not connected error in the admin source: https://stackoverflow.com/questions/41381444/websocket-connection-failed-error-during-websocket-handshake-unexpected-respon)
# proxy_http_version 1.1;
# proxy_set_header Upgrade $http_upgrade;
# proxy_set_header Connection "upgrade";
# proxy_pass http://admin/;
# }
# location /dashboard {
# proxy_set_header Host $host;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_set_header X-Forwarded-Proto $scheme;
# # enable WebSockets (for ws://sockjs not connected error in the dashboard source: https://stackoverflow.com/questions/41381444/websocket-connection-failed-error-during-websocket-handshake-unexpected-respon)
# proxy_http_version 1.1;
# proxy_set_header Upgrade $http_upgrade;
# proxy_set_header Connection "upgrade";
# proxy_pass http://dashboard/;
# }
# location /statuspage {
# proxy_set_header Host $host;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_set_header X-Forwarded-Proto $scheme;
# # enable WebSockets (for ws://sockjs not connected error in the statuspage source: https://stackoverflow.com/questions/41381444/websocket-connection-failed-error-during-websocket-handshake-unexpected-respon)
# proxy_http_version 1.1;
# proxy_set_header Upgrade $http_upgrade;
# proxy_set_header Connection "upgrade";
# proxy_pass http://StatusPage/;
# }
# location /api {
# rewrite ^/api/(.*) /$1 break;
# proxy_set_header Host $host;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_set_header X-Forwarded-Proto $scheme;
# proxy_pass http://api/;
# }
# location /realtime {
# rewrite ^/realtime/(.*) /$1 break;
# proxy_set_header Host $host;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_set_header X-Forwarded-Proto $scheme;
# proxy_pass http://realtime/;
# }
# location /docs {
# rewrite ^/docs/(.*) /$1 break;
# proxy_set_header Host $host;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_set_header X-Forwarded-Proto $scheme;
# proxy_pass http://docs/;
# }
# location /ingestor {
# rewrite ^/ingestor/(.*) /$1 break;
# proxy_set_header Host $host;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_set_header X-Forwarded-Proto $scheme;
# proxy_pass http://ingestor/;
# }
# location /probe1 {
# rewrite ^/probe1/(.*) /$1 break;
# proxy_set_header Host $host;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_set_header X-Forwarded-Proto $scheme;
# proxy_pass http://probe1/;
# }
# location /probe2 {
# rewrite ^/probe2/(.*) /$1 break;
# proxy_set_header Host $host;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_set_header X-Forwarded-Proto $scheme;
# proxy_pass http://probe2/;
# }
}

View File

@ -5,6 +5,7 @@ version: '3.7'
x-common-variables: &common-variables
IS_SAAS_SERVICE: ${IS_SAAS_SERVICE}
DEBUG: 'express:*'
services:
##IMPORTANT: