Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #2746 Create the Docs microservice #2776

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions config/env.development
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,15 @@ JWT_AUDIENCE=http://localhost
# How long should a JWT work before it expires
JWT_EXPIRES_IN=1h

################################################################################
# Documentation Service
################################################################################

# Documentation Service Port (default is 4631)
DOCS_PORT=4631

# Documentation Service URL
DOCS_URL=http://localhost/v1/docs

################################################################################
# Image Service
Expand Down
9 changes: 9 additions & 0 deletions config/env.production
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,15 @@ JWT_AUDIENCE=https://api.telescope.cdot.systems
# How long should a JWT work before it expires
JWT_EXPIRES_IN=1h

################################################################################
# Documentation Service
################################################################################

# Documentation Service Port (default is 4631)
DOCS_PORT=4631

# Documentation Service URL
DOCS_URL=https://api.telescope.cdot.systems/v1/docs

################################################################################
# Image Service
Expand Down
9 changes: 9 additions & 0 deletions config/env.staging
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,15 @@ JWT_AUDIENCE=https://dev.api.telescope.cdot.systems
# How long should a JWT work before it expires
JWT_EXPIRES_IN=1h

################################################################################
# Documentation Service
################################################################################

# Documentation Service Port (default is 4631)
DOCS_PORT=4631

# Documentation Service URL
DOCS_URL=https://dev.api.telescope.cdot.systems/v1/docs

################################################################################
# Image Service
Expand Down
6 changes: 6 additions & 0 deletions docker/development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,9 @@ services:
- '1111:1111'
environment:
- POSTS_URL=http://posts:5555

docs:
ports:
- '4631:4631'
environment:
- POSTS_URL=http://posts:5555
30 changes: 30 additions & 0 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,35 @@ services:
- PLANET_PORT
- POSTS_URL

# docs service
docs:
container_name: 'docs'
build:
context: ../src/api/docs
dockerfile: Dockerfile
environment:
- NODE_ENV
- WEB_URL
- DOCS_PORT
- DOCS_URL
# Satellite authentication/authorization support
- JWT_ISSUER
- JWT_AUDIENCE
- SECRET
depends_on:
- traefik
labels:
# Enable Traefik
- 'traefik.enable=true'
# Traefik routing for the docs service at /v1/docs
- 'traefik.http.routers.docs.rule=PathPrefix(`/${API_VERSION}/docs`)'
# Specify the docs service port
- 'traefik.http.services.docs.loadbalancer.server.port=${DOCS_PORT}'
# Add middleware to this route to strip the /v1/docs prefix
- 'traefik.http.middlewares.strip_docs_prefix.stripprefix.prefixes=/${API_VERSION}/docs'
- 'traefik.http.middlewares.strip_docs_prefix.stripprefix.forceSlash=true'
- 'traefik.http.routers.docs.middlewares=strip_docs_prefix'

##############################################################################
# Third-Party Dependencies and Support Services
##############################################################################
Expand All @@ -283,6 +312,7 @@ services:
- SEARCH_URL=${SEARCH_URL}
- FEED_DISCOVERY_URL=${FEED_DISCOVERY_URL}
- STATUS_URL=${STATUS_URL}
- DOCS_URL=${DOCS_URL}
container_name: 'nginx'
environment:
- TELESCOPE_HOST
Expand Down
4 changes: 4 additions & 0 deletions docker/gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,7 @@ services:
# # 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

docs:
ports:
- '4631:4631'
5 changes: 5 additions & 0 deletions docker/production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ services:
- POSTS_URL=${POSTS_URL}
- SEARCH_URL=${SEARCH_URL}
- FEED_DISCOVERY_URL=${FEED_DISCOVERY_URL}
- DOCS_URL=${DOCS_URL}
container_name: 'telescope'
restart: unless-stopped
environment:
Expand Down Expand Up @@ -122,6 +123,10 @@ services:
- ELASTIC_URL=http://elasticsearch
- ELASTIC_PORT=9200

# docs service
docs:
restart: unless-stopped

##############################################################################
# Third-Party Dependencies and Support Services
##############################################################################
Expand Down
Loading