Sync-in · Sovereign platform for file storage, sharing, synchronization, and collaboration.
TypeScript cloud-alternativecollaborationcollaborative-editingdropboxfile-serverfile-sharingfile-storagefile-syncfull-text-searchhomelabnextcloudon-premiseopen-sourceprivacy-firstprivate-cloudrealtimesecureself-hostedstorage-serverwebdav
build(docker): optimize production image
johavenb2f731a78b6a
diff --git a/Dockerfile b/Dockerfileindex 811f16ce..e053e442 100644--- a/Dockerfile+++ b/Dockerfile@@ -1,11 +1,11 @@FROM node:24-alpine AS build-RUN apk add --no-cache build-base g+++RUN apk add --no-cache build-baseWORKDIR /buildCOPY . .RUN npm ci && \npm run build && \npm run reset && \- npm -w backend ci --omit=dev+ npm ci --workspace=backend --omit=dev --no-audit --no-fundFROM node:24-alpine AS sync-inRUN apk add --no-cache su-exec && \@@ -20,7 +20,6 @@ COPY --from=build --chown=8888:8888 /build/environment/environment.dist.yaml ./eCOPY --from=build --chown=8888:8888 --chmod=755 /build/scripts/docker-sync-in-server.sh ./sync-in-server.shCOPY --from=build --chown=8888:8888 --chmod=755 /build/scripts/docker-entrypoint.sh ./entrypoint.shENV NODE_ENV=production-ENV NPM_CONFIG_UPDATE_NOTIFIER=falseENV PUID=8888ENV PGID=8888ENV SYNC_IN_HEALTHCHECK_URL=http://127.0.0.1:8080/healthz/ready@@ -28,4 +27,4 @@ EXPOSE 8080HEALTHCHECK --interval=30s --timeout=5s --start-period=60s --retries=3 \CMD ["node", "server/infrastructure/availability/scripts/check-health.js"]ENTRYPOINT ["./entrypoint.sh"]-CMD ["/bin/sh", "sync-in-server.sh"]+CMD ["./sync-in-server.sh"]diff --git a/backend/tsconfig.json b/backend/tsconfig.jsonindex d30e81b0..f86f53b3 100755--- a/backend/tsconfig.json+++ b/backend/tsconfig.json@@ -8,7 +8,7 @@"allowSyntheticDefaultImports": true,"esModuleInterop": true,"target": "ES2022",- "sourceMap": true,+ "sourceMap": false,"baseUrl": "./","incremental": true,"skipLibCheck": true,diff --git a/frontend/angular.json b/frontend/angular.jsonindex 96212766..f25cc727 100644--- a/frontend/angular.json+++ b/frontend/angular.json@@ -50,7 +50,7 @@"glob": "**/*","input": "src/assets","output": "assets",- "ignore": ["mimes/**"]+ "ignore": ["mimes/**", "**/*.map"]}],"budgets": [diff --git a/package.json b/package.jsonindex 77bbf5f3..f66d6883 100755--- a/package.json+++ b/package.json@@ -86,7 +86,8 @@"lint:staged": "npm --ws run lint:staged","test": "npm --ws run lint && npm -w backend test","start": "node dist/server/main.js",- "reset": "rm -Rf frontend/node_modules frontend/.angular backend/node_modules node_modules .angular; npm cache clean --force",+ "reset": "rm -rf frontend/node_modules frontend/.angular backend/node_modules node_modules .angular",+ "reset:hard": "npm run reset && npm cache clean --force","docker:build": "docker build -t $npm_package_name .","docker:buildx": "docker buildx build --platform linux/arm64,linux/amd64 --tag syncin/server:latest --tag syncin/server:${npm_package_version} --tag syncin/server:$(echo ${npm_package_version} | cut -d. -f1) . --push","docker:buildx:nopush": "docker buildx build --platform linux/arm64,linux/amd64 --tag syncin/server:latest --tag syncin/server:${npm_package_version} --tag syncin/server:$(echo ${npm_package_version} | cut -d. -f1) .",