Merge pull request #100 from johenning/chore/typescript_devDependency

chore: Typescript as `devDependency`
This commit is contained in:
Alan Grainger
2025-05-26 10:52:59 +12:00
committed by GitHub
4 changed files with 22 additions and 22 deletions
-1
View File
@@ -1,4 +1,3 @@
/app/node_modules/ /app/node_modules/
/app/dist/ /app/dist/
/app/.env /app/.env
/app/package-lock.json
+15 -15
View File
@@ -1,24 +1,24 @@
FROM node:lts-alpine FROM node:lts-alpine AS builder
RUN apk --no-cache add curl
WORKDIR /app
COPY app/ ./
RUN chown -R node:node /app
USER node USER node
WORKDIR /app
COPY --chown=node:node app/ ./
RUN npm install --omit=dev RUN npm ci \
&& npx tsc
FROM node:lts-alpine AS runner
RUN apk --no-cache add curl
USER node
WORKDIR /app
COPY --from=builder --chown=node:node app/ ./
RUN npm ci --omit=dev
ARG PACKAGE_VERSION ARG PACKAGE_VERSION
ENV APP_VERSION=${PACKAGE_VERSION} ENV APP_VERSION=${PACKAGE_VERSION}
ENV NODE_ENV=production ENV NODE_ENV=production
# Build without type checking, as we have removed the Typescript
# dev-dependencies above to save space in the final build.
# Type checking is done in the repo before building the image.
RUN npx tsc --noCheck
CMD ["node", "dist/index.js" ] CMD ["node", "dist/index.js" ]
+4 -3
View File
@@ -15,8 +15,7 @@
"dotenv": "^16.4.5", "dotenv": "^16.4.5",
"ejs": "^3.1.10", "ejs": "^3.1.10",
"express": "^4.21.1", "express": "^4.21.1",
"tslib": "^2.8.1", "tslib": "^2.8.1"
"typescript": "^5.6.2"
}, },
"bin": { "bin": {
"immich-public-proxy": "dist/index.js" "immich-public-proxy": "dist/index.js"
@@ -30,7 +29,8 @@
"@typescript-eslint/parser": "5.29.0", "@typescript-eslint/parser": "5.29.0",
"eslint": "^8.49.0", "eslint": "^8.49.0",
"eslint-config-standard": "^17.1.0", "eslint-config-standard": "^17.1.0",
"ts-node": "^10.9.2" "ts-node": "^10.9.2",
"typescript": "^5.6.2"
} }
}, },
"node_modules/@cspotcode/source-map-support": { "node_modules/@cspotcode/source-map-support": {
@@ -5182,6 +5182,7 @@
"version": "5.7.2", "version": "5.7.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.2.tgz", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.2.tgz",
"integrity": "sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==", "integrity": "sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==",
"dev": true,
"license": "Apache-2.0", "license": "Apache-2.0",
"bin": { "bin": {
"tsc": "bin/tsc", "tsc": "bin/tsc",
+3 -3
View File
@@ -23,8 +23,7 @@
"dotenv": "^16.4.5", "dotenv": "^16.4.5",
"ejs": "^3.1.10", "ejs": "^3.1.10",
"express": "^4.21.1", "express": "^4.21.1",
"tslib": "^2.8.1", "tslib": "^2.8.1"
"typescript": "^5.6.2"
}, },
"devDependencies": { "devDependencies": {
"@types/archiver": "^6.0.3", "@types/archiver": "^6.0.3",
@@ -35,6 +34,7 @@
"@typescript-eslint/parser": "5.29.0", "@typescript-eslint/parser": "5.29.0",
"eslint": "^8.49.0", "eslint": "^8.49.0",
"eslint-config-standard": "^17.1.0", "eslint-config-standard": "^17.1.0",
"ts-node": "^10.9.2" "ts-node": "^10.9.2",
"typescript": "^5.6.2"
} }
} }