@llm-translate/cli 1.0.0-next.2 → 1.0.0-next.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/Dockerfile +7 -2
  2. package/package.json +1 -1
package/Dockerfile CHANGED
@@ -38,9 +38,13 @@ COPY --from=builder --chown=llmtranslate:nodejs /app/node_modules ./node_modules
38
38
  COPY --from=builder --chown=llmtranslate:nodejs /app/dist ./dist
39
39
  COPY --from=builder --chown=llmtranslate:nodejs /app/package.json ./
40
40
 
41
+ # Create cache directory with correct ownership
42
+ RUN mkdir -p /app/cache && chown llmtranslate:nodejs /app/cache
43
+
41
44
  # Environment
42
45
  ENV NODE_ENV=production
43
46
  ENV TRANSLATE_PORT=3000
47
+ ENV TRANSLATE_CACHE_DIR=/app/cache
44
48
 
45
49
  # Switch to non-root user
46
50
  USER llmtranslate
@@ -51,5 +55,6 @@ EXPOSE 3000
51
55
  HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
52
56
  CMD node -e "fetch('http://localhost:3000/health/live').then(r => r.ok ? process.exit(0) : process.exit(1)).catch(() => process.exit(1))"
53
57
 
54
- # Start server with JSON logging for container environments
55
- CMD ["node", "dist/cli/index.js", "serve", "--json", "--cors", "--no-auth", "--cache-dir", "./.translate-cache/server"]
58
+ # ENTRYPOINT for CLI, CMD for default arguments
59
+ ENTRYPOINT ["node", "dist/cli/index.js"]
60
+ CMD ["serve", "--json", "--cors", "--no-auth", "--cache-dir", "/app/cache"]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@llm-translate/cli",
3
- "version": "1.0.0-next.2",
3
+ "version": "1.0.0-next.3",
4
4
  "description": "CLI-based document translation tool powered by LLMs with glossary enforcement and quality-aware refinement",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",