Skip to content

Commit

Permalink
Merge pull request #119 from GeneralMagicio/feat/run-mode
Browse files Browse the repository at this point in the history
Added flag for enabling jobs or graphql server
  • Loading branch information
aminlatifi authored Oct 31, 2024
2 parents d85dc29 + 89226f1 commit 41293c5
Show file tree
Hide file tree
Showing 4 changed files with 188 additions and 126 deletions.
6 changes: 5 additions & 1 deletion config/test.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
GRAPHQL_MODE=true
JOB_MODE=true

JWT_SECRET=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
MAILER_JWT_SECRET=0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
JWT_MAX_AGE=7d
Expand Down Expand Up @@ -235,4 +238,5 @@ QACC_NETWORK_ID=1101
QACC_DONATION_TOKEN_ADDRESS=0x22B21BedDef74FE62F031D2c5c8F7a9F8a4b304D
QACC_DONATION_TOKEN_DECIMALS=18
QACC_DONATION_TOKEN_NAME=Polygon Ecosystem Token
QACC_DONATION_TOKEN_SYMBOL=POL
QACC_DONATION_TOKEN_SYMBOL=POL

23 changes: 21 additions & 2 deletions docker-compose-local.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
services:
qacc-be:
container_name: qacc-be
qacc-be-graph-ql:
container_name: qacc-be-graph-ql
build: .
profiles:
- server
command: npm run start:docker:locally
environment:
- ENVIRONMENT=local
- LOG_PATH=/usr/src/app/logs/qacc.log
- GRAPHQL_MODE=true
restart: always
volumes:
- ./config:/usr/src/app/config
Expand All @@ -18,6 +19,24 @@ services:
ports:
- '4001:4000'

qacc-be:
container_name: qacc-be-job
build: .
profiles:
- server
command: npm run start:docker:locally
environment:
- ENVIRONMENT=local
- LOG_PATH=/usr/src/app/logs/qacc.log
- JOB_MODE=true
restart: always
volumes:
- ./config:/usr/src/app/config
- ./config:/usr/src/app/build/config
- ./logs:/usr/src/app/logs
networks:
- qacc

qacc-postgres:
container_name: qacc-postgres
image: postgres:16
Expand Down
25 changes: 21 additions & 4 deletions docker-compose-staging.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
services:
qacc-be:
container_name: qacc-be
container_name: qacc-be-graph-ql
image: ghcr.io/generalmagicio/qacc-be:staging
command: npm run start:docker:server
environment:
- ENVIRONMENT=production
- LOG_PATH=/usr/src/app/logs/qacc.log
- GRAPHQL_MODE=true
restart: always
volumes:
- ./config:/usr/src/app/config
Expand All @@ -14,7 +15,23 @@ services:
networks:
- qacc
ports:
- "4001:4000"
- '4001:4000'

qacc-be-job:
container_name: qacc-be-job
image: ghcr.io/generalmagicio/qacc-be:staging
command: npm run start:docker:server
environment:
- ENVIRONMENT=production
- LOG_PATH=/usr/src/app/logs/qacc.log
- JOB_MODE=true
restart: always
volumes:
- ./config:/usr/src/app/config
- ./config:/usr/src/app/build/config
- ./logs:/usr/src/app/logs
networks:
- qacc

qacc-redis:
container_name: qacc-redis
Expand All @@ -27,7 +44,7 @@ services:
networks:
- qacc
ports:
- "6379:6379"
- '6379:6379'

caddy:
image: caddy:2-alpine
Expand Down Expand Up @@ -56,4 +73,4 @@ volumes:
networks:
qacc:
name: qacc-be_qacc
external: true
external: true
Loading

0 comments on commit 41293c5

Please sign in to comment.