-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
34 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,20 @@ | ||
# Dockerfile from Astro docs | ||
|
||
FROM node:20.10.0-slim AS base | ||
ARG NODE_VERSION=20.13.1 | ||
|
||
FROM node:${NODE_VERSION}-alpine AS base | ||
WORKDIR /app | ||
|
||
FROM base AS build | ||
COPY package.json yarn.lock ./ | ||
|
||
FROM base AS prod-deps | ||
RUN yarn install --production | ||
|
||
FROM base AS build-deps | ||
RUN yarn install --production=false | ||
|
||
FROM build-deps AS build | ||
RUN yarn install --frozen-lockfile | ||
COPY . . | ||
RUN yarn build | ||
|
||
FROM nginx:stable-alpine3.17-slim AS runtime | ||
COPY ./docker/nginx.conf /etc/nginx/nginx.conf | ||
COPY --from=prod-deps /app/node_modules /usr/share/nginx/html/node_modules | ||
|
||
# sufficient for SSG | ||
COPY --from=build /app/dist /usr/share/nginx/html | ||
EXPOSE 8080 | ||
EXPOSE 8080 | ||
|