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