-
-
Notifications
You must be signed in to change notification settings - Fork 167
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from rsammelson/default-comment-sort
Default comment sort
- Loading branch information
Showing
113 changed files
with
10,939 additions
and
1,382 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 @@ | ||
*.swp | ||
.git/ | ||
.github/ | ||
.gitignore | ||
.prettierignore | ||
.vscode/ |
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 +1,2 @@ | ||
dist/ | ||
dist/ | ||
pnpm-lock.yaml |
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,55 +1,51 @@ | ||
# stage 0: set base image w/common customizations | ||
FROM docker.io/library/node:lts-alpine AS base | ||
|
||
# Prepare work directory | ||
WORKDIR /wefwef | ||
WORKDIR /voyager | ||
|
||
# enable corepack & set network-timeout | ||
RUN corepack enable &&\ | ||
pnpm config set network-timeout 300000 | ||
|
||
FROM base AS builder | ||
|
||
RUN corepack enable | ||
# stage 1: build | ||
FROM base AS builder | ||
|
||
# Prepare deps | ||
RUN apk update | ||
RUN apk add git --no-cache | ||
RUN apk add --no-cache git | ||
|
||
# Prepare build deps ( ignore postinstall scripts for now ) | ||
COPY package.json ./ | ||
COPY yarn.lock ./ | ||
RUN yarn config set network-timeout 300000 | ||
RUN yarn --frozen-lockfile --ignore-scripts | ||
COPY package.json pnpm-lock.yaml ./ | ||
RUN pnpm install --frozen-lockfile --ignore-scripts | ||
|
||
# Copy all source files | ||
COPY . ./ | ||
|
||
# Build | ||
RUN yarn build | ||
RUN pnpm build | ||
|
||
FROM base AS runner | ||
|
||
ARG UID=911 | ||
ARG GID=911 | ||
# stage 2: runtime | ||
FROM base AS runner | ||
|
||
RUN corepack enable | ||
ARG UID=911 GID=911 | ||
|
||
COPY package.json ./ | ||
COPY yarn.lock ./ | ||
COPY server.mjs ./ | ||
COPY package.json pnpm-lock.yaml server.mjs ./ | ||
|
||
RUN yarn config set network-timeout 300000 | ||
RUN yarn --prod --frozen-lockfile --ignore-scripts | ||
RUN pnpm install --prod --frozen-lockfile --ignore-scripts | ||
|
||
# Create a dedicated user and group | ||
RUN set -eux; \ | ||
addgroup -g $GID wefwef; \ | ||
adduser -u $UID -D -G wefwef wefwef; | ||
addgroup -g "${GID}" voyager; \ | ||
adduser -u "${UID}" -D -G voyager voyager | ||
|
||
USER wefwef | ||
USER voyager | ||
|
||
ENV NODE_ENV=production | ||
ENV NODE_ENV=production PORT=5314 | ||
|
||
COPY --from=builder /wefwef/dist ./dist | ||
COPY --from=builder /voyager/dist ./dist | ||
|
||
EXPOSE 5314/tcp | ||
|
||
ENV PORT=5314 | ||
|
||
CMD ["node", "./server.mjs"] | ||
CMD ["node","./server.mjs"] |
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
Oops, something went wrong.