diff --git a/.idea/.gitignore b/.idea/.gitignore deleted file mode 100644 index b58b603..0000000 --- a/.idea/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml -# Editor-based HTTP Client requests -/httpRequests/ diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml deleted file mode 100644 index 03d9549..0000000 --- a/.idea/inspectionProfiles/Project_Default.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index 7dec97e..0000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/portfolio.iml b/.idea/portfolio.iml deleted file mode 100644 index 24643cc..0000000 --- a/.idea/portfolio.iml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 35eb1dd..0000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/dockerfile b/dockerfile new file mode 100644 index 0000000..f2c4e80 --- /dev/null +++ b/dockerfile @@ -0,0 +1,27 @@ +FROM node:latest AS build + +WORKDIR /build + +# Copy source files +COPY src src +COPY public public +COPY package.json package.json +COPY package-lock.json package-lock.json + +# Install dependencies & build +RUN npm install +RUN npm run build + +# Final image +FROM node:latest AS final +WORKDIR /app + +EXPOSE 3000 + +# Install serve for serving +RUN npm install -g serve + +# Copy build +COPY --from=build /build/build/ /app/ + +ENTRYPOINT [ "serve", "-s", "/app" ] \ No newline at end of file diff --git a/pipeline.yml b/pipeline.yml index 03098f5..7530eee 100644 --- a/pipeline.yml +++ b/pipeline.yml @@ -2,11 +2,17 @@ kind: pipeline type: exec name: default -platform: - os: linux - arch: amd64 - steps: -- name: greeting - commands: - - echo hello world \ No newline at end of file +- name: Build + image: plugins/docker + settings: + dockerfile: dockerfile + repo: portfolio + tags: + - latest + +trigger: + branch: + - master + event: + - push \ No newline at end of file