Skip to content

Commit

Permalink
Added redis to docker-compose
Browse files Browse the repository at this point in the history
  • Loading branch information
IKCAP committed Jul 19, 2020
1 parent 54ed42e commit 910bfa6
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
GOOGLE_APPLICATION_CREDENTIALS=./src/config/mint-full-4dc148cc116b.json
REDIS_URL=redis://redis:6379
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ WORKDIR /home/node/app
COPY package*.json ./
RUN npm install
COPY --chown=node:node . .
RUN npm run build

USER node
EXPOSE 3000
Expand Down
6 changes: 6 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
version: '3'
services:
redis:
image: redis
ports:
- "26379:6379"
ensemble-manager:
build: .
image: mintproject/ensemble-manager
restart: always
depends_on:
- redis
env_file:
- .env
ports:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"scripts": {
"start": "node --inspect=5858 -r ts-node/register ./src/server.ts",
"start:watch": "nodemon",
"build": "tsc"
"build": "tsc --build tsconfig.json"
},
"nodemonConfig": {
"ignore": [
Expand Down
2 changes: 1 addition & 1 deletion src/config/redis.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const REDIS_URL = process.env.REDIS_URL || 'redis://127.0.0.1:6379';
export const EXECUTION_QUEUE_NAME = "EnsembleManagerLocalExecution";
export const MONITOR_QUEUE_NAME = "EnsembleManagerLocalMonitor";
export const CONCURRENCY = 10;
export const CONCURRENCY = 10;

0 comments on commit 910bfa6

Please # to comment.