Skip to content

Commit

Permalink
Possible example of a utility package -- everything compiles but noth…
Browse files Browse the repository at this point in the history
…ing transferred yet
  • Loading branch information
purple-emily committed Feb 4, 2024
1 parent 7d5883b commit 6adddf1
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ services:

addon:
build:
context: src/node/addon
dockerfile: Dockerfile
context: src/node
dockerfile: addon/Dockerfile
ports:
- "7000:7000"
env_file:
Expand Down
14 changes: 12 additions & 2 deletions src/node/addon/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,20 @@ RUN apk update && apk upgrade && \

WORKDIR /app

COPY package*.json ./
COPY ./addon/package*.json ./
RUN npm install
COPY . .
COPY ./addon/ .
RUN npm run build

# Create the utility package

WORKDIR /utility

COPY ./utility/package*.json ./
RUN npm install
COPY ./utility/ .
# RUN npm run build

# --- Runtime Stage ---
FROM node:lts-alpine

Expand All @@ -22,6 +31,7 @@ WORKDIR /app
ENV NODE_ENV production

COPY --from=builder /app ./
COPY --from=builder /utility /utility
RUN npm prune --omit=dev

EXPOSE 7000
Expand Down
8 changes: 8 additions & 0 deletions src/node/addon/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/node/addon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"debrid-link-api": "^1.0.1",
"express-rate-limit": "^6.7.0",
"ip": "^1.1.8",
"knightcrawler-utility": "file:../utility",
"magnet-uri": "^6.2.0",
"name-to-imdb": "^3.0.4",
"named-queue": "^2.2.1",
Expand Down
9 changes: 9 additions & 0 deletions src/node/utility/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"name": "knightcrawler-utility",
"version": "0.0.1",
"description": "A collection of utility scripts and configurations for the Knight Crawler addon and consumer.",
"type": "module",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
}
}

0 comments on commit 6adddf1

Please sign in to comment.