lifeto-shop/Dockerfile

14 lines
350 B
Docker
Raw Normal View History

2025-06-23 06:33:03 +00:00
FROM node:24-alpine as NODEBUILDER
2022-07-13 22:59:38 +00:00
WORKDIR /wd
2025-06-23 06:36:30 +00:00
# Copy only package files first for better caching
COPY package.json yarn.lock ./
2025-06-23 06:33:03 +00:00
RUN corepack yarn install
2025-06-23 06:36:30 +00:00
# Copy source code after dependencies are installed
COPY . .
2025-06-23 06:33:03 +00:00
RUN corepack yarn build
2022-07-13 22:59:38 +00:00
2025-06-23 06:33:03 +00:00
FROM caddy:2.10-alpine
2022-07-13 22:59:38 +00:00
WORKDIR /wd
2025-05-13 21:02:59 +00:00
COPY Caddyfile /etc/caddy/Caddyfile
2022-07-13 22:59:38 +00:00
COPY --from=NODEBUILDER /wd/dist dist