zakscode/Dockerfile
ztimson 94c2f336f6
All checks were successful
Build Website / Build NPM Project (push) Successful in 19s
Build Website / Tag Version (push) Successful in 7s
Build Website / Build & Push Dockerfile (push) Successful in 42s
Zakscode is now using momentum
2024-12-30 12:05:38 -05:00

22 lines
490 B
Docker

FROM node:20-alpine as build
# Variables
ARG NODE_ENV=prod
ARG NODE_OPTIONS="--max_old_space_size=4096"
ENV NG_CLI_ANALYTICS=ci \
NODE_ENV=${NODE_ENV} \
NODE_OPTIONS=${NODE_OPTIONS}
# Setup
RUN mkdir /app
WORKDIR /app
COPY . .
# Build
RUN if [ ! -d "dist" ]; then npm install && npm run build; fi
# Use Nginx to serve
FROM git.zakscode.com/ztimson/momentum:latest
RUN rm -rf /app/server/public/assets /app/server/public/index.html
COPY --from=build /app/dist /app/server/public