Skip to content

Conversation

@MikolajKasprzak
Copy link
Contributor

@MikolajKasprzak MikolajKasprzak commented Oct 30, 2025

πŸ“ Description

Added gunicorn with TLS as web server for mapping app

✨ Type of Change

Select the type of change your PR introduces:

  • 🐞 Bug fix – Non-breaking change which fixes an issue
  • πŸš€ New feature – Non-breaking change which adds functionality
  • πŸ”¨ Refactor – Non-breaking change which refactors the code base
  • πŸ’₯ Breaking change – Changes that break existing functionality
  • πŸ“š Documentation update
  • πŸ”’ Security update
  • πŸ§ͺ Tests
  • πŸš‚ CI

πŸ§ͺ Testing Scenarios

Describe how the changes were tested and how reviewers can test them too:

  • βœ… Tested manually
  • πŸ€– Ran automated end-to-end tests

βœ… Checklist

Before submitting the PR, ensure the following:

  • πŸ” PR title is clear and descriptive
  • πŸ“ For internal contributors: If applicable, include the JIRA ticket number (e.g., ITEP-123456) in the PR title. Do not include full URLs
  • πŸ’¬ I have commented my code, especially in hard-to-understand areas
  • πŸ“„ I have made corresponding changes to the documentation
  • βœ… I have added tests that prove my fix is effective or my feature works

@saratpoluri saratpoluri force-pushed the feature/mapping-service branch from 4e6f12b to 171cf8a Compare October 31, 2025 05:12
Copy link
Contributor

@ltalarcz ltalarcz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In review.

@MikolajKasprzak MikolajKasprzak marked this pull request as ready for review October 31, 2025 14:10
@jakubsikorski jakubsikorski requested a review from Copilot October 31, 2025 14:54
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds TLS-enabled Gunicorn as the production web server for the mapping application, replacing the Flask development server. The changes introduce certificate management infrastructure and command-line options to switch between development and production modes.

Key Changes

  • Added Gunicorn with TLS support as the default production server mode
  • Implemented certificate generation and mounting for the mapping service
  • Added command-line arguments to toggle between development (Flask) and production (Gunicorn + TLS) modes

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tools/certificates/Makefile Added mapping-cert and mapping-csr targets for certificate generation
sample_data/docker-compose-dl-streamer-example.yml Added mapping certificate secrets and mounted them to the mapping service
mapping/src/vggt_service.py Imported app object for Gunicorn access
mapping/src/mapanything_service.py Imported app object for Gunicorn access
mapping/src/api_service_base.py Added Gunicorn server support with TLS, command-line argument parsing, and dual-mode operation
mapping/requirements_api.txt Added gunicorn dependency
mapping/Dockerfile Simplified startup script to support development/production modes via environment variables

πŸ’‘ Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

target: certs/scenescape-mapping.key
healthcheck:
test: ["CMD", "curl", "-I", "-s", "http://localhost:8000/health"]
test: ["CMD", "curl", "-k", "-I", "-s", "https://localhost:8000/health"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you change also port number? 8000 is typically used for HTTP

Comment on lines +339 to +343
parser.add_argument(
"--dev-mode",
action="store_true",
help="Run in development mode with Flask development server (default: production mode with Gunicorn + TLS)"
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please consider removing dev-mode, I don't think we need it at all.

@saratpoluri saratpoluri dismissed ltalarcz’s stale review October 31, 2025 19:25

Addressed comments.

@saratpoluri saratpoluri merged commit 38cc71e into feature/mapping-service Oct 31, 2025
@saratpoluri saratpoluri deleted the tls-mapping-service branch October 31, 2025 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants