Skip to content
Snippets Groups Projects
Commit 1a6a0979 authored by Mohammed Rachid BENHAMMOU's avatar Mohammed Rachid BENHAMMOU
Browse files

update gitlab-ci.yaml

parent ecf90a96
No related branches found
No related tags found
No related merge requests found
Pipeline #66025 passed
/node_modules
.idea
.prettierrc.json
yarn-error.log
...@@ -5,17 +5,17 @@ include: ...@@ -5,17 +5,17 @@ include:
file: "templates/frontend/.frontend-angular-npm-node-18.yml" file: "templates/frontend/.frontend-angular-npm-node-18.yml"
variables: variables:
TARGET_APP_NAME: allocine TARGET_APP_NAME: front
USE_LOCAL_DOCKERFILE: "true" ARTIFACT_PATH: dist/allocinefront/browser
ARTIFACT_PATH: dist
build: build:
artifacts: artifacts:
paths: paths:
- dist - dist/allocinefront
variables: variables:
SIZE: large SIZE: large
test: test:
variables: variables:
SIZE: large SIZE: large
......
FROM node:18-alpine as build-stage
WORKDIR /app
COPY package*.json /app/
RUN npm install
COPY ./ /app/
ARG configuration=production
RUN npm run build -- --output-path=./dist/out --configuration $configuration
FROM nginx:1.15
COPY --from=build-stage /app/dist/out/ /usr/share/nginx/html
COPY ./nginx-custom.conf /etc/nginx/conf.d/default.conf
# Expires map
map $sent_http_content_type $expires {
default off;
text/html epoch;
text/css max;
application/json max;
application/javascript max;
~image/ max;
}
server {
listen 80;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html =404;
}
expires $expires;
gzip on;
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment