-
-
Notifications
You must be signed in to change notification settings - Fork 33
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
1 parent
bf14aa6
commit 2cc3750
Showing
7 changed files
with
67 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Publish website | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- Website/** | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
uses: ./.github/workflows/build.yaml | ||
with: | ||
ref: main | ||
dockerfile: "Website/Dockerfile" | ||
image-name: "dawnshard-website" | ||
secrets: inherit |
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
FROM node:22.3.0-bookworm-slim AS base | ||
|
||
EXPOSE 3000 | ||
|
||
ENV NPM_CONFIG_PREFIX=/home/node/.npm-global | ||
ENV PATH=$PATH:/home/node/.npm-global/bin | ||
RUN npm install -g pnpm | ||
|
||
ENV PNPM_HOME="/pnpm" | ||
ENV PATH="$PNPM_HOME:$PATH" | ||
|
||
WORKDIR /app | ||
COPY ["Website/package.json", "Website/pnpm-lock.yaml", "./"] | ||
|
||
FROM base AS prod-deps | ||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prod --frozen-lockfile | ||
|
||
FROM base AS build | ||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile | ||
COPY ["Website/", "./"] | ||
RUN echo "PUBLIC_ENABLE_MSW=false" >> ./.env.production | ||
RUN pnpm run build | ||
|
||
FROM base | ||
COPY --from=prod-deps ["/app/node_modules", "./node_modules"] | ||
COPY --from=build ["/app/build", "./"] | ||
|
||
ENV NODE_ENV="production" | ||
|
||
USER node | ||
CMD ["node", "./index.js"] |
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
Binary file not shown.
Binary file not shown.