-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
public: Rework Containerfile for Nuxt
- Loading branch information
1 parent
378b8c7
commit 7c0f2c4
Showing
5 changed files
with
63 additions
and
18 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Environmental variables | ||
NUXT_API_SERVER_URL=http://127.0.0.1:12345 | ||
NUXT_API_SERVER_UPLOADS_PATH=uploads | ||
NUXT_PUBLIC_API_SERVER_URL=http://127.0.0.1:12345 | ||
NUXT_PUBLIC_API_SERVER_UPLOADS_PATH=uploads | ||
NUXT_APP_BASE_PATH=/ |
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,41 @@ | ||
### BASE ### | ||
FROM node:lts-alpine as base | ||
|
||
### BUILD STAGE ### | ||
FROM base as build | ||
RUN corepack enable pnpm | ||
|
||
# Build arguments | ||
ARG GIT_HASH | ||
ENV GIT_HASH=${GIT_HASH} | ||
|
||
# Copy files | ||
WORKDIR /build | ||
COPY package.json . | ||
COPY pnpm-*.yaml . | ||
COPY packages/ packages/ | ||
COPY projects/Public projects/Public | ||
|
||
# Build | ||
# RUN --mount=type=cache,id=pnpm,target=/pnpm/store \ | ||
# pnpm install --frozen-lockfile | ||
RUN pnpm install --frozen-lockfile | ||
RUN pnpm common:build && pnpm public build | ||
|
||
# Deploy | ||
RUN pnpm deploy --filter @myboothmanager/public --prod /prod/public | ||
|
||
|
||
### PRODUCTION STAGE ### | ||
FROM base as production | ||
RUN corepack enable pnpm | ||
|
||
# Copy files | ||
WORKDIR /app | ||
COPY --from=build /prod/public . | ||
|
||
# Expose port | ||
EXPOSE 31113 | ||
|
||
# Start server | ||
ENTRYPOINT ["/bin/sh", "-c", "pnpm start:prod"] |
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