File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11FROM node:22-alpine AS builder
2+
23EXPOSE 8080
34
45WORKDIR /app
56COPY package.json package-lock.json ./
67RUN npm install --no-cache
78COPY . .
89RUN chmod +x build.sh
9- RUN ./build.sh
1010
11+ RUN ./build.sh
1112
1213FROM nginx:stable-alpine AS final
1314
15+ ARG APPLICATION_VERSION
1416COPY deployment/nginx.conf /etc/nginx/nginx.conf
1517COPY deployment/default.conf /etc/nginx/conf.d/default.conf
18+ RUN sed -i "s|\$ APPLICATION_VERSION|${APPLICATION_VERSION}|g" /etc/nginx/conf.d/default.conf
1619COPY --from=builder --chown=nginx:nginx /app/root/redirect.conf /etc/nginx/extra/redirect.conf
1720
1821RUN rm -rf /usr/share/nginx/html/*
Original file line number Diff line number Diff line change 55 location / {
66 root /usr/share/nginx/html;
77 index index.html index.htm;
8+ add_header X-REVISION $APPLICATION_VERSION;
89 }
910 include /etc/nginx/extra/*.conf;
1011
You can’t perform that action at this time.
0 commit comments