Skip to content
Snippets Groups Projects
Commit 50e5a3fc authored by Bilel El Yaagoubi's avatar Bilel El Yaagoubi
Browse files

dockerise front

parent 6e2ca4d5
No related branches found
No related tags found
1 merge request!2Ocotbranche
Pipeline #42235 passed with warnings
......@@ -50,6 +50,7 @@ build-front:
IMAGE_NAME: front
build-back:
allow_failure: true
extends: .build
variables:
CONTEXT: backend/
......
.dockerignore
.env.development
.eslintrc.js
.prettierrc
Dockerfile
node_modules
dist
FROM node:16 as build
WORKDIR /frontend
COPY package.json package-lock.json ./
RUN npm install
COPY . .
RUN touch .env
RUN echo "VUE_APP_BACKEND_BASE_URL=webroot.example.com" >> .env
RUN npm run build
FROM nginxinc/nginx-unprivileged:latest
COPY --chown=nginx --from=build /frontend/dist/ /usr/share/nginx/html
ENTRYPOINT sed -i -e "s/webroot.example.com/$VUE_APP_BACKEND_BASE_URL/g" /usr/share/nginx/html/js/app.*.js \
&& nginx -g 'daemon off;'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment