CognxSafeTrack commited on
Commit ·
54834cf
1
Parent(s): 9da8695
fix: ensure production build and runtime use compiled JS to avoid tsx dependency
Browse files- Dockerfile +1 -0
- ecosystem.config.js +2 -4
Dockerfile
CHANGED
|
@@ -27,6 +27,7 @@ RUN pnpm --filter @repo/prompts build
|
|
| 27 |
|
| 28 |
# 6. Build apps
|
| 29 |
RUN pnpm --filter api build
|
|
|
|
| 30 |
|
| 31 |
# Environment variables
|
| 32 |
ENV NODE_ENV=production
|
|
|
|
| 27 |
|
| 28 |
# 6. Build apps
|
| 29 |
RUN pnpm --filter api build
|
| 30 |
+
RUN pnpm --filter whatsapp-worker build
|
| 31 |
|
| 32 |
# Environment variables
|
| 33 |
ENV NODE_ENV=production
|
ecosystem.config.js
CHANGED
|
@@ -3,9 +3,8 @@ const services = process.env.SERVICES ? process.env.SERVICES.split(',') : ['api'
|
|
| 3 |
const apps = [
|
| 4 |
{
|
| 5 |
name: 'api',
|
| 6 |
-
script: 'apps/api/
|
| 7 |
interpreter: 'node',
|
| 8 |
-
interpreter_args: '--import tsx',
|
| 9 |
instances: 1,
|
| 10 |
exec_mode: 'fork',
|
| 11 |
env: {
|
|
@@ -15,9 +14,8 @@ const apps = [
|
|
| 15 |
},
|
| 16 |
{
|
| 17 |
name: 'worker',
|
| 18 |
-
script: 'apps/whatsapp-worker/
|
| 19 |
interpreter: 'node',
|
| 20 |
-
interpreter_args: '--import tsx',
|
| 21 |
instances: 1,
|
| 22 |
exec_mode: 'fork',
|
| 23 |
env: {
|
|
|
|
| 3 |
const apps = [
|
| 4 |
{
|
| 5 |
name: 'api',
|
| 6 |
+
script: 'apps/api/dist/index.js',
|
| 7 |
interpreter: 'node',
|
|
|
|
| 8 |
instances: 1,
|
| 9 |
exec_mode: 'fork',
|
| 10 |
env: {
|
|
|
|
| 14 |
},
|
| 15 |
{
|
| 16 |
name: 'worker',
|
| 17 |
+
script: 'apps/whatsapp-worker/dist/index.js',
|
| 18 |
interpreter: 'node',
|
|
|
|
| 19 |
instances: 1,
|
| 20 |
exec_mode: 'fork',
|
| 21 |
env: {
|