Skip to content

Commit

Permalink
Making parser service work
Browse files Browse the repository at this point in the history
- Initial work from @manekenpix
- Edited `npm run dev`
- Export Redis constructor instead
- Added changes based on backend and Seneca-CDOT#2706 Seneca-CDOT#2581
- Bumped node-fetch to 2.6.7
  • Loading branch information
manekenpix authored and TueeNguyen committed Feb 6, 2022
1 parent da1041d commit 1c7d041
Show file tree
Hide file tree
Showing 43 changed files with 2,574 additions and 2,014 deletions.
4 changes: 2 additions & 2 deletions config/env.development
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,8 @@ LOG_LEVEL=debug
MOCK_ELASTIC=

# Redis Server info, password may be optional (e.g., leave empty if you don't set one)
#REDIS_URL=redis://127.0.0.1
#REDIS_PORT=6379
REDIS_URL=redis://127.0.0.1
REDIS_PORT=6379
#REDIS_PASSWORD=

# MOCK_REDIS=1 will use an in-memory, mock Redis instance. Useful for testing.
Expand Down
10 changes: 5 additions & 5 deletions docker/development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,11 @@ services:
- test-web-content

# TODO: https://github.com/Seneca-CDOT/telescope/issues/2111
# parser:
# environment:
# # For development and testing, the Parser service needs to contact the users
# # service directly via Docker vs through the http://localhost domain.
# - USERS_URL=http://users:7000
parser:
environment:
# For development and testing, the Parser service needs to contact the users
# service directly via Docker vs through the http://localhost domain.
- USERS_URL=http://users:7000

planet:
ports:
Expand Down
51 changes: 22 additions & 29 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -228,35 +228,28 @@ services:
- 'traefik.http.routers.users.middlewares=strip_users_prefix'

# parser service - disabled, https://github.com/Seneca-CDOT/telescope/issues/2111
# parser:
# container_name: 'parser'
# build:
# context: ../src/api/parser
# dockerfile: Dockerfile
# environment:
# - NODE_ENV
# - PARSER_PORT
# - USERS_URL
# # Satellite authentication/authorization support
# - JWT_ISSUER
# - JWT_AUDIENCE
# - SECRET
# depends_on:
# - traefik
# - redis
# - users
# - elasticsearch
# labels:
# # Enable Traefik
# - 'traefik.enable=true'
# # Traefik routing for the parser service at /v1/parser
# - 'traefik.http.routers.parser.rule=PathPrefix(`/${API_VERSION}/parser`)'
# # Specify the parser service port
# - 'traefik.http.services.parser.loadbalancer.server.port=${PARSER_PORT}'
# # Add middleware to this route to strip the /v1/parser prefix
# - 'traefik.http.middlewares.strip_parser_prefix.stripprefix.prefixes=/${API_VERSION}/parser'
# - 'traefik.http.middlewares.strip_parser_prefix.stripprefix.forceSlash=true'
# - 'traefik.http.routers.parser.middlewares=strip_parser_prefix'
parser:
container_name: 'parser'
build:
context: ../src/api/parser
dockerfile: Dockerfile
environment:
- NODE_ENV
- REDIS_URL
- REDIS_PORT
- ELASTIC_URL
- ELASTIC_PORT
- ELASTIC_DELAY_MS=10000
- FEED_URL
- FEED_URL_INTERVAL_MS
- FEED_PROCESSING_DELAY_SEC
- FEED_QUEUE_ATTEMPTS
- FEED_QUEUE_DELAY_MS
- FEED_QUEUE_PARALLEL_WORKERS

depends_on:
- redis
- elasticsearch

# planet service
planet:
Expand Down
Loading

0 comments on commit 1c7d041

Please sign in to comment.