From 47bf9db86ee88688874ce2d86c568ee299e031e7 Mon Sep 17 00:00:00 2001 From: Shreyank Byadagi Date: Thu, 1 Jul 2021 18:48:19 +0530 Subject: [PATCH] shreyank: Dockerize mifos web-app --- Dockerfile | 21 +++++++++++++++++++++ src/environments/environment.prod.ts | 4 ++-- src/environments/environment.ts | 4 ++-- 3 files changed, 25 insertions(+), 4 deletions(-) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..944038750 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,21 @@ +FROM node:12-alpine as builder + +WORKDIR /usr/src/app + +ENV PATH /usr/src/app/node_modules/.bin:$PATH + +COPY package.json /usr/src/app/package.json + +RUN npm install -g @angular/cli@9.1.12 + +RUN npm install + +COPY . . + +FROM nginx:1.19.3 + +COPY --from=builder /usr/src/app/dist/web-app /usr/share/nginx/html + +EXPOSE 80 + +CMD ["nginx", "-g", "daemon off;"] diff --git a/src/environments/environment.prod.ts b/src/environments/environment.prod.ts index ff288db37..8e07620df 100644 --- a/src/environments/environment.prod.ts +++ b/src/environments/environment.prod.ts @@ -3,10 +3,10 @@ import env from './.env'; export const environment = { production: true, - version: env.mifos_x_version, + version: env[mifos_x_version], fineractPlatformTenantId: 'default', // For connecting to server running elsewhere update the tenant identifier baseApiUrl: JSON.parse(localStorage.getItem('mifosXServerURL')) || 'https://demo.fineract.dev', // For connecting to server running elsewhere update the base API URL - allowServerSwitch: env.allow_switching_backend_instance, + allowServerSwitch: env[allow_switching_backend_instance], apiProvider: '/fineract-provider/api', apiVersion: '/v1', serverUrl: '', diff --git a/src/environments/environment.ts b/src/environments/environment.ts index be1503bfb..21d139d49 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -8,10 +8,10 @@ import env from './.env'; export const environment = { production: false, - version: env.mifos_x_version + '-dev', + version: env[mifos_x_version] + '-dev', fineractPlatformTenantId: 'default', // For connecting to server running elsewhere update the tenant identifier baseApiUrl: JSON.parse(localStorage.getItem('mifosXServerURL')) || 'https://dev.mifos.io', // For connecting to server running elsewhere update the base API URL - allowServerSwitch: env.allow_switching_backend_instance, + allowServerSwitch: env[allow_switching_backend_instance], apiProvider: '/fineract-provider/api', apiVersion: '/v1', serverUrl: '',