Skip to content
Snippets Groups Projects
Commit 2cb681ef authored by derrabauke's avatar derrabauke
Browse files

created a dockerfile for the client/frontend

parent 6ee2f986
No related branches found
No related tags found
No related merge requests found
......@@ -35,3 +35,7 @@ test_server:
- npm install
- npm run test
build_client:
stage: build
script:
- docker build -f app/client/Dockerfile -t client:v0.0.1 client
# Build a release
FROM node:12.16.3 as build
RUN mkdir /usr/src/app
WORKDIR /usr/src/app
ENV PATH /usr/src/app/node_modules/.bin:$PATH
COPY package.json /usr/src/app/package.json
RUN npm install
COPY . /usr/src/app
RUN npm run build
# Put this stuff into a nginx server
FROM nginx:latest
# copy from previous build to this image
COPY --from=build /usr/src/app/build /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment