Skip to content

Commit

Permalink
(feature) add ingestor to docker compose
Browse files Browse the repository at this point in the history
  • Loading branch information
AHarmlessPyro committed Sep 5, 2022
1 parent c5d4033 commit 8cc8277
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 7 deletions.
25 changes: 19 additions & 6 deletions docker-compose-local.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,36 @@ services:
command: redis-server --save 20 1 --loglevel warning --requirepass eYVX7EwVmmxKPCDmwMtyKVge8oLd2t81
volumes:
- cache:/data
backend:
ingestor:
build:
context: ./
dockerfile: ./deploy/backend/Dockerfile
command: yarn start-collector
# image: metlo/backend
container_name: metlo-backend
container_name: metlo-ingestor
depends_on:
- cache
restart: unless-stopped
ports:
- 8080:8080
- 8081:8081
environment:
- DB_URL=postgres://postgres:postgres@db:5432/metlo_api_security
backend:
build:
context: ./
dockerfile: ./deploy/backend/Dockerfile
# image: metlo/backend
container_name: metlo-backend
depends_on:
- cache
restart: unless-stopped
environment:
- DB_URL=postgres://postgres:postgres@db:5432/metlo_api_security
- REDIS_URL=redis://:eYVX7EwVmmxKPCDmwMtyKVge8oLd2t81@cache:6379
- ENCRYPTION_KEY
- BACKEND_URL
- EXPRESS_SECRET
- ENCRYPTION_KEY=AB3IBTaL80Ytjw6ZjbiU+AM1d+Mgp37MR1/1S2fekrU=
### BACKEND_URL should point to externally accessible url for ingestor ###
- BACKEND_URL=http://localhost:8081
- EXPRESS_SECRET=617f8d1a-7a48-4053-a845-d9eae66e0bbe
jobs:
image: metlo/jobrunner
container_name: metlo-jobs
Expand Down
14 changes: 13 additions & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,17 @@ services:
volumes:
- db:/var/lib/postgresql/data
- ./init.sql:/docker-entrypoint-initdb.d/init_db.sql
ingestor:
image: metlo/backend
command: yarn start-collector
container_name: metlo-ingestor
depends_on:
- cache
restart: unless-stopped
ports:
- 8081:8081
environment:
- DB_URL=postgres://postgres:postgres@db:5432/metlo_api_security
cache:
image: redis:7.0.4
restart: always
Expand All @@ -28,7 +39,8 @@ services:
- DB_URL=postgres://postgres:postgres@db:5432/metlo_api_security
- REDIS_URL=redis://:eYVX7EwVmmxKPCDmwMtyKVge8oLd2t81@cache:6379
#- ENCRYPTION_KEY=
#- BACKEND_URL=
### BACKEND_URL should point to externally accessible url for ingestor ###
#- BACKEND_URL=
#- EXPRESS_SECRET=
jobs:
image: metlo/jobrunner
Expand Down

0 comments on commit 8cc8277

Please sign in to comment.