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
|
2024-04-25 16:59:55 -05:00
|
|
|
|
|
|
|
WORKDIR /app
|
2023-12-09 07:21:57 -06:00
|
|
|
COPY --from=builder /app/dist /usr/share/nginx/html
|
2023-12-11 20:37:06 -06:00
|
|
|
|
2024-04-25 16:59:55 -05:00
|
|
|
# setup entrypoint
|
|
|
|
ADD ./docker-entrypoint.sh docker-entrypoint.sh
|
|
|
|
RUN chmod a+x docker-entrypoint.sh
|
2023-12-11 20:37:06 -06:00
|
|
|
|
2024-07-20 07:21:04 -05:00
|
|
|
ENTRYPOINT ["/app/docker-entrypoint.sh"]
|