CognxSafeTrack commited on
Commit ·
29d83ee
1
Parent(s): 4fc4120
feat(docker): bypass build issues and run directly with tsx
Browse files- Dockerfile +2 -5
- apps/api/tsconfig.json +1 -1
- apps/whatsapp-worker/tsconfig.json +1 -1
Dockerfile
CHANGED
|
@@ -36,13 +36,10 @@ ENV NODE_OPTIONS="--max-old-space-size=2048"
|
|
| 36 |
# Build all packages and apps to ensure dist folders are populated
|
| 37 |
RUN pnpm -r build
|
| 38 |
|
| 39 |
-
# Make script executable
|
| 40 |
-
RUN chmod +x scripts/start-backend.sh
|
| 41 |
-
|
| 42 |
# Expose port (HF Spaces uses 7860)
|
| 43 |
EXPOSE 7860
|
| 44 |
ENV PORT=7860
|
| 45 |
|
| 46 |
-
# Start command
|
| 47 |
-
CMD ["
|
| 48 |
|
|
|
|
| 36 |
# Build all packages and apps to ensure dist folders are populated
|
| 37 |
RUN pnpm -r build
|
| 38 |
|
|
|
|
|
|
|
|
|
|
| 39 |
# Expose port (HF Spaces uses 7860)
|
| 40 |
EXPOSE 7860
|
| 41 |
ENV PORT=7860
|
| 42 |
|
| 43 |
+
# Start command: Use TSX directly to bypass `dist` folder mismatch issues
|
| 44 |
+
CMD ["sh", "-c", "pnpm --filter @repo/database db:push && (tsx apps/whatsapp-worker/src/index.ts &) && tsx apps/api/src/index.ts"]
|
| 45 |
|
apps/api/tsconfig.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
"extends": "@repo/tsconfig/base.json",
|
| 3 |
"compilerOptions": {
|
| 4 |
"outDir": "dist",
|
| 5 |
-
"rootDir": "
|
| 6 |
},
|
| 7 |
"include": [
|
| 8 |
"src/**/*"
|
|
|
|
| 2 |
"extends": "@repo/tsconfig/base.json",
|
| 3 |
"compilerOptions": {
|
| 4 |
"outDir": "dist",
|
| 5 |
+
"rootDir": "src"
|
| 6 |
},
|
| 7 |
"include": [
|
| 8 |
"src/**/*"
|
apps/whatsapp-worker/tsconfig.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
"extends": "@repo/tsconfig/base.json",
|
| 3 |
"compilerOptions": {
|
| 4 |
"outDir": "dist",
|
| 5 |
-
"rootDir": "
|
| 6 |
},
|
| 7 |
"include": [
|
| 8 |
"src/**/*"
|
|
|
|
| 2 |
"extends": "@repo/tsconfig/base.json",
|
| 3 |
"compilerOptions": {
|
| 4 |
"outDir": "dist",
|
| 5 |
+
"rootDir": "src"
|
| 6 |
},
|
| 7 |
"include": [
|
| 8 |
"src/**/*"
|