diff --git a/Dockerfile b/Dockerfile index 92c189c..5e2212d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:20-alpine +FROM node:20-alpine AS base WORKDIR /checker @@ -6,12 +6,17 @@ COPY package.json ./ COPY pnpm-lock.yaml ./ COPY src ./src -LABEL org.opencontainers.image.source=https://git.pfy.ch/pfych/chapter-tracker -LABEL org.opencontainers.image.description="Ping a webhook when a new MangaDex chapter is released" -LABEL org.opencontainers.image.licenses=MIT - RUN npm install -g pnpm RUN pnpm install RUN pnpm run compile -CMD ["node", "./.out/build.js"] +FROM node:20-alpine AS app + +LABEL org.opencontainers.image.source=https://git.pfy.ch/pfych/chapter-tracker +LABEL org.opencontainers.image.description="Ping a webhook when a new MangaDex chapter is released" +LABEL org.opencontainers.image.licenses=MIT + +WORKDIR /checker +COPY --from=base /checker/.out/build.js build.js + +CMD ["node", "build.js"] diff --git a/package.json b/package.json index dd7f599..a3e7bc0 100644 --- a/package.json +++ b/package.json @@ -16,15 +16,17 @@ "license": "MIT", "packageManager": "pnpm@10.7.1", "dependencies": { + "axios": "1.8.4", + "lodash-es": "4.17.21" + }, + "devDependencies": { "@types/lodash-es": "4.17.12", "@types/node": "22.14.1", - "axios": "1.8.4", "esbuild": "0.25.2", "@typescript-eslint/eslint-plugin": "7.2.0", "@typescript-eslint/parser": "7.2.0", "eslint": "8.57.0", "eslint-config-prettier": "9.1.0", - "lodash-es": "4.17.21", "prettier": "3.5.3", "typescript": "5.8.3" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 44d7c7e..6cc1d25 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,6 +8,13 @@ importers: .: dependencies: + axios: + specifier: 1.8.4 + version: 1.8.4 + lodash-es: + specifier: 4.17.21 + version: 4.17.21 + devDependencies: '@types/lodash-es': specifier: 4.17.12 version: 4.17.12 @@ -20,9 +27,6 @@ importers: '@typescript-eslint/parser': specifier: 7.2.0 version: 7.2.0(eslint@8.57.0)(typescript@5.8.3) - axios: - specifier: 1.8.4 - version: 1.8.4 esbuild: specifier: 0.25.2 version: 0.25.2 @@ -32,9 +36,6 @@ importers: eslint-config-prettier: specifier: 9.1.0 version: 9.1.0(eslint@8.57.0) - lodash-es: - specifier: 4.17.21 - version: 4.17.21 prettier: specifier: 3.5.3 version: 3.5.3