diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000000000000000000000000000000000000..6b4238b83c4e238a291ab6f3273a5648c0a80806 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,2 @@ +node_modules +npm-debug.log diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..ad4e63182adfea7c769870adf4e8a93e3525542b --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,10 @@ +build site: + image: node:10 + stage: build + script: + - npm install --progress=false + - npm run build + artifacts: + expire_in: 1 week + paths: + - dist \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..5451a4a9a0b4a4e189cea0bb350598508c998c0e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,19 @@ +FROM node:10 + +# Create app directory +WORKDIR /usr/src/vizmasy + +# Install app dependencies +# A wildcard is used to ensure both package.json AND package-lock.json are copied +# where available (npm@5+) +COPY package*.json ./ + +RUN npm install +# RUN npm ci --only=production if building for production + +# Bundle app source +COPY . . + +EXPOSE 8080 +# execute NPM +CMD [ "npm", "start" ] \ No newline at end of file