-
Notifications
You must be signed in to change notification settings - Fork 0
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
5 changed files
with
49 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
node_modules | ||
.git | ||
.gitignore | ||
*.md | ||
dist | ||
Dockerfile |
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,6 @@ | ||
# Extract these from the game exectuable | ||
# log output will be in color even inside docker, if set to 1 | ||
FORCE_COLOR=1 | ||
# Extract these next 2 secrets from the game exectuable | ||
MASTER_SECRET= | ||
# 9 strings comma seperated | ||
# 9 strings comma seperated, i.e. GAME_SECRETS=abc,def,ghi,jkl,mno,pqr,stu,wxy,zab | ||
GAME_SECRETS= |
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-alpine AS base | ||
ENV PNPM_HOME="/pnpm" | ||
ENV PATH="$PNPM_HOME:$PATH" | ||
|
||
RUN corepack enable | ||
|
||
USER node | ||
WORKDIR /app | ||
|
||
# Dependencies | ||
FROM base AS prod-deps | ||
COPY package.json pnpm-lock.yaml ./ | ||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prod --frozen-lockfile | ||
|
||
# Building | ||
FROM base AS build | ||
COPY . . | ||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile | ||
RUN pnpm run build | ||
|
||
# Run | ||
FROM base as runner | ||
ENV NODE_ENV production | ||
|
||
COPY --chown=node:node --from=build /app/dist /app/dist | ||
COPY --chown=node:node --from=prod-deps /app/package.json /app/package.json | ||
COPY --chown=node:node --from=prod-deps /app/node_modules /app/node_modules | ||
|
||
RUN corepack pack | ||
|
||
CMD ["pnpm", "start"] |
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,7 @@ | ||
services: | ||
server: | ||
build: . | ||
env_file: ".env" | ||
ports: | ||
- "80:80" | ||
- "8085:8085/udp" |
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