-
Notifications
You must be signed in to change notification settings - Fork 3
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 #62 from cirroskais/api-v1
unify configuration (use environment variables) and dockerize
- Loading branch information
Showing
19 changed files
with
901 additions
and
580 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,11 @@ | ||
.vscode | ||
.gitignore | ||
.prettierrc | ||
LICENSE | ||
README.md | ||
node_modules | ||
.env | ||
.data | ||
out | ||
dist | ||
tsconfig.tsbuildinfo |
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,23 @@ | ||
PORT= | ||
REQUEST_TIMEOUT= | ||
TRUST_PROXY= | ||
FORCE_SSL= | ||
|
||
DISCORD_TOKEN= | ||
|
||
MAX__DISCORD_FILES= | ||
MAX__DISCORD_FILE_SIZE= | ||
MAX__UPLOAD_ID_LENGTH= | ||
|
||
TARGET__GUILD= | ||
TARGET__CHANNEL= | ||
|
||
ACCOUNTS__REGISTRATION_ENABLED= | ||
ACCOUNTS__REQUIRED_FOR_UPLOAD= | ||
|
||
MAIL__HOST= | ||
MAIL__PORT= | ||
MAIL__SECURE= | ||
MAIL__SEND_FROM= | ||
MAIL__USER= | ||
MAIL__PASS= |
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,27 @@ | ||
FROM node:21-alpine AS base | ||
WORKDIR /usr/src/app | ||
|
||
FROM base AS install | ||
RUN mkdir -p /tmp/dev | ||
COPY package.json package-lock.json /tmp/dev/ | ||
RUN cd /tmp/dev && npm install | ||
|
||
RUN mkdir -p /tmp/prod | ||
COPY package.json package-lock.json /tmp/prod/ | ||
RUN cd /tmp/prod && npm install --omit=dev | ||
|
||
FROM base AS build | ||
COPY --from=install /tmp/dev/node_modules node_modules | ||
COPY . . | ||
|
||
RUN npm run build | ||
|
||
FROM base AS app | ||
COPY --from=install /tmp/prod/node_modules node_modules | ||
COPY --from=build /usr/src/app/out out | ||
COPY --from=build /usr/src/app/dist dist | ||
COPY package.json . | ||
COPY assets assets | ||
|
||
EXPOSE 3000 | ||
ENTRYPOINT [ "node", "./out/server/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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
services: | ||
monofile: | ||
container_name: "monofile" | ||
image: monofile | ||
build: . | ||
env_file: .env | ||
volumes: | ||
- ".data:/usr/src/app/.data" | ||
ports: | ||
- "3000:3000" |
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.