Skip to content

Commit

Permalink
set different command for running job and graphql
Browse files Browse the repository at this point in the history
  • Loading branch information
aminlatifi committed Nov 6, 2024
1 parent 635fe21 commit 20f1dae
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
22 changes: 11 additions & 11 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@ services:
qacc-be-graph-ql1:
container_name: qacc-be-graph-ql1
image: ${DOCKER_IMAGE}
command: npm run start:docker:server
command: npm run start:docker:server-graphql
environment:
- ENVIRONMENT=production
- LOG_PATH=/usr/src/app/logs/qacc.log
- GRAPHQL_MODE=true
restart: always
labels:
- "autoheal=true"
- 'autoheal=true'
volumes:
- ./config:/usr/src/app/config
- ./config:/usr/src/app/build/config
- ./logs-graph-ql:/usr/src/app/logs
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:4000/health"]
test: ['CMD', 'curl', '-f', 'http://localhost:4000/health']
interval: 30s
timeout: 10s
retries: 5
Expand All @@ -28,20 +28,20 @@ services:
qacc-be-graph-ql2:
container_name: qacc-be-graph-ql2
image: ${DOCKER_IMAGE}
command: npm run start:docker:server
command: npm run start:docker:server-graphql
environment:
- ENVIRONMENT=production
- LOG_PATH=/usr/src/app/logs/qacc.log
- GRAPHQL_MODE=true
restart: always
labels:
- "autoheal=true"
- 'autoheal=true'
volumes:
- ./config:/usr/src/app/config
- ./config:/usr/src/app/build/config
- ./logs-graph-ql:/usr/src/app/logs
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:4000/health"]
test: ['CMD', 'curl', '-f', 'http://localhost:4000/health']
interval: 30s
timeout: 10s
retries: 5
Expand All @@ -54,20 +54,20 @@ services:
qacc-be-graph-ql3:
container_name: qacc-be-graph-ql3
image: ${DOCKER_IMAGE}
command: npm run start:docker:server
command: npm run start:docker:server-graphql
environment:
- ENVIRONMENT=production
- LOG_PATH=/usr/src/app/logs/qacc.log
- GRAPHQL_MODE=true
restart: always
labels:
- "autoheal=true"
- 'autoheal=true'
volumes:
- ./config:/usr/src/app/config
- ./config:/usr/src/app/build/config
- ./logs-graph-ql:/usr/src/app/logs
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:4000/health"]
test: ['CMD', 'curl', '-f', 'http://localhost:4000/health']
interval: 30s
timeout: 10s
retries: 5
Expand All @@ -80,7 +80,7 @@ services:
qacc-be-job:
container_name: qacc-be-job1
image: ${DOCKER_IMAGE}
command: npm run start:docker:server
command: npm run start:docker:server-job
environment:
- ENVIRONMENT=production
- LOG_PATH=/usr/src/app/logs/qacc.log
Expand Down Expand Up @@ -147,4 +147,4 @@ volumes:
networks:
qacc:
name: qacc-be_qacc
external: true
external: true
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,8 @@
"build": "rm -rf ./build && tsc && mkdir ./build/config && mkdir ./build/src/server/adminJs/tabs/components && cp -r src/server/adminJs/tabs/components/* ./build/src/server/adminJs/tabs/components/ && mkdir ./build/src/utils/locales && cp -r ./src/utils/locales/* ./build/src/utils/locales/ && cp -r ./src/abi build/src/abi ",
"dev": "NODE_ENV=development node ./build/src/index.js",
"production": "NODE_ENV=production node ./build/src/index.js",
"start:docker:server": "npm run db:migrate:run:production && npm run production",
"start:docker:server-job": "npm run db:migrate:run:production && npm run production",
"start:docker:server-graphql": "npm run production",
"start:docker:locally": "npm run db:migrate:run:local && npm run dev",
"postinstall": "patch-package",
"sync:inverter:test": "NODE_ENV=test node ./build/src/scripts/runScript.js",
Expand Down

0 comments on commit 20f1dae

Please sign in to comment.