This repository has been archived by the owner on Dec 28, 2023. It is now read-only.
-
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
1 parent
d83092b
commit 6012e60
Showing
29 changed files
with
1,186 additions
and
764 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,7 @@ | ||
.* | ||
!.npmrc | ||
!.swcrc | ||
build | ||
coverage | ||
node_modules | ||
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,3 +1,4 @@ | ||
COMPOSE_PROJECT_NAME=thream-file-uploads-api | ||
API_KEY=apiKeySecret | ||
API_URL=http://localhost:8000 | ||
HOST=0.0.0.0 | ||
|
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
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,26 @@ | ||
FROM node:20.5.0 AS builder-dependencies | ||
WORKDIR /usr/src/application | ||
COPY ./package*.json ./ | ||
RUN npm clean-install | ||
|
||
FROM node:20.5.0 AS runner-dependencies | ||
WORKDIR /usr/src/application | ||
ENV NODE_ENV=production | ||
COPY ./package*.json ./ | ||
RUN npm clean-install --omit=dev --ignore-scripts | ||
|
||
FROM node:20.5.0 AS builder | ||
WORKDIR /usr/src/application | ||
COPY --from=builder-dependencies /usr/src/application/node_modules ./node_modules | ||
COPY ./ ./ | ||
RUN npm run build | ||
|
||
FROM gcr.io/distroless/nodejs20-debian11:latest AS runner | ||
WORKDIR /usr/src/application | ||
ENV NODE_ENV=production | ||
ENV NODE_OPTIONS=--enable-source-maps | ||
COPY --from=runner-dependencies /usr/src/application/node_modules ./node_modules | ||
COPY --from=builder /usr/src/application/package.json ./package.json | ||
COPY --from=builder /usr/src/application/build ./build | ||
COPY --from=builder /usr/src/application/uploads ./uploads | ||
CMD ["./build/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
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 @@ | ||
services: | ||
thream-file-uploads-api: | ||
container_name: ${COMPOSE_PROJECT_NAME} | ||
image: 'thream-file-uploads-api' | ||
restart: 'unless-stopped' | ||
network_mode: 'host' | ||
build: | ||
context: './' | ||
env_file: '.env' | ||
volumes: | ||
- './uploads:/usr/src/application/uploads' |
Oops, something went wrong.