nostrudel/dockerfile

29 lines
561 B
Plaintext
Raw Permalink Normal View History

2023-07-16 15:41:24 -05:00
# syntax=docker/dockerfile:1
2024-07-20 07:21:04 -05:00
FROM node:20-alpine AS builder
2023-12-09 07:21:57 -06:00
2023-07-16 15:41:24 -05:00
WORKDIR /app
2024-02-06 11:50:16 +00:00
# Install dependencies
COPY ./package*.json .
COPY ./yarn.lock .
ENV NODE_ENV='development'
RUN yarn install --production=false --frozen-lockfile
COPY . .
2023-12-09 07:21:57 -06:00
2023-10-04 12:26:38 -05:00
ENV VITE_COMMIT_HASH=""
ENV VITE_APP_VERSION="custom"
2024-02-06 11:50:16 +00:00
RUN yarn build
2023-07-16 15:41:24 -05:00
2024-07-20 07:21:04 -05:00
FROM nginx:stable-alpine-slim AS main
2023-07-16 15:41:24 -05:00
EXPOSE 80
WORKDIR /app
2023-12-09 07:21:57 -06:00
COPY --from=builder /app/dist /usr/share/nginx/html
# setup entrypoint
ADD ./docker-entrypoint.sh docker-entrypoint.sh
RUN chmod a+x docker-entrypoint.sh
2024-07-20 07:21:04 -05:00
ENTRYPOINT ["/app/docker-entrypoint.sh"]