Final (for now) bug fixes
This commit is contained in:
@@ -21,7 +21,7 @@ USER appuser
|
|||||||
# copy data
|
# copy data
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
# install
|
# install and test
|
||||||
USER root
|
USER root
|
||||||
RUN . /etc/profile && apk add --virtual .npm-install-virt --no-cache git
|
RUN . /etc/profile && apk add --virtual .npm-install-virt --no-cache git
|
||||||
USER appuser
|
USER appuser
|
||||||
@@ -31,9 +31,6 @@ RUN apk del .npm-install-virt
|
|||||||
USER appuser
|
USER appuser
|
||||||
ENV NODE_ENV production
|
ENV NODE_ENV production
|
||||||
|
|
||||||
# test
|
|
||||||
RUN npm test
|
|
||||||
|
|
||||||
# cleanup
|
# cleanup
|
||||||
USER root
|
USER root
|
||||||
RUN rm -r ./src ./public/js-source ./bio-proxy-configuration-for-docker && \
|
RUN rm -r ./src ./public/js-source ./bio-proxy-configuration-for-docker && \
|
||||||
|
|||||||
@@ -15,20 +15,20 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
- redis
|
- redis
|
||||||
environment:
|
environment:
|
||||||
- NODE_ENV=debug
|
- "NODE_ENV=debug"
|
||||||
- PORT=3000
|
- "PORT=3000"
|
||||||
- EXTERNAL_BASE_URL=http://localhost
|
- "EXTERNAL_BASE_URL=http://localhost"
|
||||||
- REDIS_URL=redis://redis:6379
|
- "REDIS_URL=redis://redis:6379"
|
||||||
- WELLKNOWN_CONFIG_URI=https://nodejs1-2.biotronik.int/auth/realms/CoE-BS/.well-known/openid-configuration
|
- "WELLKNOWN_CONFIG_URI=https://nodejs1-2.biotronik.int/auth/realms/CoE-BS/.well-known/openid-configuration"
|
||||||
- CLIENT_ID=demo
|
- "CLIENT_ID=demo"
|
||||||
- CLIENT_SECRET=fb49b346-c515-4680-adb1-beee0bd5b66e
|
- "CLIENT_SECRET=fb49b346-c515-4680-adb1-beee0bd5b66e"
|
||||||
- CLIENT_SCOPE=openid email profile roles groups
|
- "CLIENT_SCOPE=openid email profile roles groups"
|
||||||
- EXT_REDIRECT_URI=http://localhost/oauth/redirect
|
- "EXT_REDIRECT_URI=http://localhost/oauth/redirect"
|
||||||
- EXT_POST_LOGOUT_REDIRECT_URI=http://localhost
|
- "EXT_POST_LOGOUT_REDIRECT_URI=http://localhost"
|
||||||
- EXT_POST_LOGIN_REDIRECT_URI=http://localhost
|
- "EXT_POST_LOGIN_REDIRECT_URI=http://localhost"
|
||||||
- PROXY_TARGET_URI=http://localhost:3000
|
- "PROXY_TARGET_URI=http://host.docker.internal:3000"
|
||||||
- SSL_VERIFY=false
|
- "SSL_VERIFY=false"
|
||||||
- BASE_PATH=/base
|
- "NO_PROXY=redis:6379"
|
||||||
ports:
|
ports:
|
||||||
- 3001:3000
|
- 3001:3000
|
||||||
networks:
|
networks:
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ services:
|
|||||||
- "SESSION_SECRET=replace with random"
|
- "SESSION_SECRET=replace with random"
|
||||||
- "USERINFO_HEADER=X-Userinfo-Token"
|
- "USERINFO_HEADER=X-Userinfo-Token"
|
||||||
- "AUTH_PROXY_URL=http://proxy:3000/oauth"
|
- "AUTH_PROXY_URL=http://proxy:3000/oauth"
|
||||||
- "NO_PROXY=redis:6379"
|
- "NO_PROXY=redis:6379,proxy:3000"
|
||||||
depends_on:
|
depends_on:
|
||||||
- redis
|
- redis
|
||||||
networks:
|
networks:
|
||||||
@@ -29,19 +29,20 @@ services:
|
|||||||
- app
|
- app
|
||||||
- redis
|
- redis
|
||||||
environment:
|
environment:
|
||||||
- "PROXY_USERINFO_SECRET=3d513168-c92d-4f57-8c78-8fb2efad8a34"
|
- "NODE_ENV=debug"
|
||||||
- "PROXY_TARGET_URI=http://app:3000"
|
- "PORT=3000"
|
||||||
- "HOST=0.0.0.0"
|
- "EXTERNAL_BASE_URL=http://localhost"
|
||||||
- "COOKIE_SECRET=05e8cc4b-f95f-4a70-b4a1-b22ce295348d"
|
- "REDIS_URL=redis://redis:6379"
|
||||||
- "WELLKNOWN_CONFIG_URI=https://nodejs1-2.biotronik.int/auth/realms/CoE-BS/.well-known/openid-configuration"
|
- "WELLKNOWN_CONFIG_URI=https://nodejs1-2.biotronik.int/auth/realms/CoE-BS/.well-known/openid-configuration"
|
||||||
- "CLIENT_ID=demo"
|
- "CLIENT_ID=demo"
|
||||||
- "CLIENT_SECRET=fb49b346-c515-4680-adb1-beee0bd5b66e"
|
- "CLIENT_SECRET=fb49b346-c515-4680-adb1-beee0bd5b66e"
|
||||||
- "CLIENT_SCOPE=openid email profile roles groups"
|
- "CLIENT_SCOPE=openid email profile roles groups"
|
||||||
- "NODE_ENV=debug"
|
- "EXT_REDIRECT_URI=http://localhost/oauth/redirect"
|
||||||
|
- "EXT_POST_LOGOUT_REDIRECT_URI=http://localhost"
|
||||||
|
- "EXT_POST_LOGIN_REDIRECT_URI=http://localhost"
|
||||||
|
- "PROXY_TARGET_URI=http://app:3000"
|
||||||
- "SSL_VERIFY=false"
|
- "SSL_VERIFY=false"
|
||||||
- "EXT_RESOURCE_URI=http://localhost"
|
- "NO_PROXY=redis:6379,app:3000"
|
||||||
- "REDIS_URL=redis://redis:6379"
|
|
||||||
- "NO_PROXY=redis:6379"
|
|
||||||
networks:
|
networks:
|
||||||
- backend
|
- backend
|
||||||
- frontend
|
- frontend
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
"build": "tsc",
|
"build": "tsc",
|
||||||
"production": "node --use-openssl-ca --unhandled-rejections=strict ./out/index",
|
"production": "node --use-openssl-ca --unhandled-rejections=strict ./out/index",
|
||||||
"install-debug": "npm install && npm run build",
|
"install-debug": "npm install && npm run build",
|
||||||
"install-prod": "npm install --only=dev && npm install --only=prod && npm run build && npm run del-node-module && npm install --only=prod",
|
"install-prod": "npm install --only=dev && npm install --only=prod && npm run build && npm test && npm run del-node-module && npm install --only=prod",
|
||||||
"del-node-module:default": "rm -r node_modules",
|
"del-node-module:default": "rm -r node_modules",
|
||||||
"del-node-module:windows": "if exist node_modules rmdir /Q/S node_modules",
|
"del-node-module:windows": "if exist node_modules rmdir /Q/S node_modules",
|
||||||
"del-node-module": "run-script-os"
|
"del-node-module": "run-script-os"
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import {UserInfo} from '../src/utils/userinfo';
|
|||||||
|
|
||||||
describe('frontend:SomeModule', () => {
|
describe('frontend:SomeModule', () => {
|
||||||
const CONFIG = {EXTERNAL_BASE_URL: 'http://demo.url'};
|
const CONFIG = {EXTERNAL_BASE_URL: 'http://demo.url'};
|
||||||
before(() => {
|
beforeEach(() => {
|
||||||
setConfig(CONFIG);
|
setConfig(CONFIG);
|
||||||
fetchMock.config.overwriteRoutes = true;
|
fetchMock.config.overwriteRoutes = true;
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import * as express from 'express';
|
|||||||
const healthRouter = express.Router();
|
const healthRouter = express.Router();
|
||||||
|
|
||||||
healthRouter.get('/', async (req, res) => {
|
healthRouter.get('/', async (req, res) => {
|
||||||
|
req.noHttpLogging = true;
|
||||||
res.sendStatus(200);
|
res.sendStatus(200);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user