summaryrefslogtreecommitdiffstats
path: root/cds-ui
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2019-02-14 13:56:44 +0000
committerGerrit Code Review <gerrit@onap.org>2019-02-14 13:56:44 +0000
commitf37a17a6fa877cd3fdba51ecf12d4dd7b9277880 (patch)
treec2c5e22d8204a920ecd89fb036c107d96fb39cb3 /cds-ui
parent46d410a9bb83c325370bdedbdd89bcbb7fa5fdf4 (diff)
parentae7b27aa50cdc3cbcf96139050f1c2dd9956cfaa (diff)
Merge "Create a Dockerfile for CDS-UI"
Diffstat (limited to 'cds-ui')
-rw-r--r--cds-ui/.dockerignore85
-rw-r--r--cds-ui/Dockerfile35
2 files changed, 120 insertions, 0 deletions
diff --git a/cds-ui/.dockerignore b/cds-ui/.dockerignore
new file mode 100644
index 000000000..00137e31f
--- /dev/null
+++ b/cds-ui/.dockerignore
@@ -0,0 +1,85 @@
+# editor config
+.editorconfig
+
+# Node.js
+# Logs
+logs
+*.log
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+
+# Runtime data
+pids
+*.pid
+*.seed
+*.pid.lock
+
+# Directory for instrumented libs generated by jscoverage/JSCover
+lib-cov
+
+# Coverage directory used by tools like istanbul
+coverage
+
+# nyc test coverage
+.nyc_output
+
+# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
+.grunt
+
+# Bower dependency directory (https://bower.io/)
+bower_components
+
+# node-waf configuration
+.lock-wscript
+
+# Compiled binary addons (https://nodejs.org/api/addons.html)
+build/Release
+
+# Dependency directories
+client/node_modules/
+client/jspm_packages/
+client/dist/
+
+# TypeScript v1 declaration files
+typings/
+
+# Optional npm cache directory
+.npm
+
+# Optional eslint cache
+.eslintcache
+
+# Optional REPL history
+.node_repl_history
+
+# Output of 'npm pack'
+*.tgz
+
+# Yarn Integrity file
+.yarn-integrity
+
+# dotenv environment variables file
+.env
+.env.test
+
+# parcel-bundler cache (https://parceljs.org/)
+.cache
+
+# next.js build output
+.next
+
+# nuxt.js build output
+.nuxt
+
+# vuepress build output
+.vuepress/dist
+
+# Serverless directories
+.serverless/
+
+# FuseBox cache
+.fusebox/
+
+# DynamoDB Local files
+.dynamodb/
diff --git a/cds-ui/Dockerfile b/cds-ui/Dockerfile
new file mode 100644
index 000000000..5bf65f428
--- /dev/null
+++ b/cds-ui/Dockerfile
@@ -0,0 +1,35 @@
+# Building client html and js files
+FROM alpine:3.8 as builder
+
+RUN apk add --no-cache npm
+
+WORKDIR /opt/cds-ui/client/
+
+COPY client/package.json /opt/cds-ui/client/
+
+RUN npm install
+
+COPY client /opt/cds-ui/client/
+
+RUN npm run build
+
+
+# Building and creating server
+FROM alpine:3.8
+
+WORKDIR /opt/cds-ui/
+
+RUN apk add --no-cache npm
+
+COPY server/package.json /opt/cds-ui/
+
+RUN npm install
+
+COPY server /opt/cds-ui/
+COPY --from=builder /opt/cds-ui/server/public /opt/cds-ui/public
+
+RUN npm run build
+
+EXPOSE 3000
+
+CMD [ "npm", "start" ]