You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by aw...@apache.org on 2019/09/05 15:03:50 UTC

[fineract-cn-fims-web-app] branch develop updated: Dockerize fims web app

This is an automated email from the ASF dual-hosted git repository.

awasum pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract-cn-fims-web-app.git


The following commit(s) were added to refs/heads/develop by this push:
     new b097ba1  Dockerize fims web app
     new 9029910  Merge pull request #18 from awasum/docker
b097ba1 is described below

commit b097ba1c34237e31f71d73c30b2492d151b67c73
Author: Awasum Yannick <aw...@apache.org>
AuthorDate: Sat Jul 6 17:52:57 2019 +0100

    Dockerize fims web app
---
 .dockerignore            |  3 +++
 Dockerfile               | 25 +++++++++++++++++++++++++
 scripts/nginx/nginx.conf |  2 +-
 3 files changed, 29 insertions(+), 1 deletion(-)

diff --git a/.dockerignore b/.dockerignore
new file mode 100644
index 0000000..1b4c2c8
--- /dev/null
+++ b/.dockerignore
@@ -0,0 +1,3 @@
+dist
+node_modules
+bower_components
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..b02bece
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,25 @@
+# Stage 1: Build fims web app
+FROM node:8.11.2-alpine as node
+
+WORKDIR /usr/src/app
+
+COPY package*.json ./
+
+RUN npm install
+
+COPY . .
+
+RUN npm run build
+
+# Stage 2: Host Fims web app on Nginx
+FROM nginx:1.16.0
+
+RUN rm -f /etc/nginx/nginx.conf
+
+COPY --from=node /usr/src/app/dist /usr/share/nginx/html
+
+COPY ./scripts/nginx/nginx.conf /etc/nginx/nginx.conf
+
+EXPOSE 8888
+
+CMD ["nginx", "-g", "daemon off;"]
diff --git a/scripts/nginx/nginx.conf b/scripts/nginx/nginx.conf
index 5d12402..d0efeb2 100644
--- a/scripts/nginx/nginx.conf
+++ b/scripts/nginx/nginx.conf
@@ -9,7 +9,7 @@ http {
     server_name  localhost;
     large_client_header_buffers 4 32k;
 
-    root   fims;
+    root   /usr/share/nginx/html;
     index  index.html index.htm;
     include mime.types;