Website updates
This commit is contained in:
19
Dockerfile
19
Dockerfile
@ -1,4 +1,4 @@
|
||||
FROM node as build
|
||||
FROM node:20-alpine as build
|
||||
|
||||
# Variables
|
||||
ARG NODE_ENV=prod
|
||||
@ -8,15 +8,24 @@ ENV NG_CLI_ANALYTICS=ci \
|
||||
NODE_OPTIONS=${NODE_OPTIONS}
|
||||
|
||||
# Setup
|
||||
RUN mkdir /app
|
||||
WORKDIR /app
|
||||
COPY . .
|
||||
|
||||
# Install & build
|
||||
RUN if [ ! -d "dist" ]; then npm ci && npm run build; fi
|
||||
# Build
|
||||
RUN if [ ! -d "dist" ]; then npm install && npm run build; fi
|
||||
|
||||
# Use Nginx to serve
|
||||
FROM nginx:1.20-alpine
|
||||
COPY --from=build /app/dist/browser /usr/share/nginx/html
|
||||
FROM nginx:1.23-alpine
|
||||
COPY --from=build /app/dist /usr/share/nginx/html
|
||||
|
||||
# Copy aditional files
|
||||
COPY package.json /usr/share/nginx/html
|
||||
COPY docker/robots.txt /usr/share/nginx/html/robots.txt
|
||||
COPY docker/nginx.conf /etc/nginx/nginx.conf
|
||||
|
||||
# Setup environment varible script
|
||||
COPY docker/setup-environment.sh /docker-entrypoint.d/setup-environment.sh
|
||||
RUN chmod +x /docker-entrypoint.d/setup-environment.sh
|
||||
|
||||
EXPOSE 80
|
||||
|
Reference in New Issue
Block a user