diff options
author | Alexis de Talhouët <adetalhouet89@gmail.com> | 2019-03-26 12:44:59 -0400 |
---|---|---|
committer | Alexis de Talhouët <adetalhouet89@gmail.com> | 2019-03-26 17:37:31 +0000 |
commit | a298b9eeec90e7eb4499751ef17e8cc9f9d65111 (patch) | |
tree | dfa5641504c5bd82b2c6680c3fc5569be68ad0aa /cds-ui/application | |
parent | 4aee3138b446163fe45d4a92758e16068132ac41 (diff) |
Fix cds ui build
Change-Id: I0ce7472367348f044ef81f49613876083a2332ff
Issue-ID: CCSDK-1177
Signed-off-by: Alexis de Talhouët <adetalhouet89@gmail.com>
Diffstat (limited to 'cds-ui/application')
-rw-r--r-- | cds-ui/application/.dockerignore | 85 | ||||
-rw-r--r-- | cds-ui/application/Dockerfile | 35 | ||||
-rw-r--r-- | cds-ui/application/pom.xml | 3 |
3 files changed, 121 insertions, 2 deletions
diff --git a/cds-ui/application/.dockerignore b/cds-ui/application/.dockerignore new file mode 100644 index 000000000..00137e31f --- /dev/null +++ b/cds-ui/application/.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/application/Dockerfile b/cds-ui/application/Dockerfile new file mode 100644 index 000000000..5bf65f428 --- /dev/null +++ b/cds-ui/application/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" ] diff --git a/cds-ui/application/pom.xml b/cds-ui/application/pom.xml index 842655934..3ab1d338b 100644 --- a/cds-ui/application/pom.xml +++ b/cds-ui/application/pom.xml @@ -56,7 +56,7 @@ limitations under the License. <goal>execute</goal> </goals> <configuration> - <source>../TagVersion.groovy</source> + <source>${project.basedir}/../../TagVersion.groovy</source> </configuration> </execution> </executions> @@ -80,7 +80,6 @@ limitations under the License. <name>${image.name}</name> <build> <cleanup>try</cleanup> - <dockerFileDir>..</dockerFileDir> <tags> <tag>${project.docker.latestminortag.version}</tag> <tag>${project.docker.latestfulltag.version}</tag> |