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

Self signed certs #2542

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Self signed certs #2542

wants to merge 2 commits into from

Conversation

Shbhom
Copy link

@Shbhom Shbhom commented Oct 6, 2024

used mkcert to generate local SSL certificates inside the nginx/certs directory, and then path binded that directory to /etc/nginx/certs directory inside the container, which I added in the nginx's default.dev.conf

Solving Issue #748

Description 📣

This pull request adds support for local SSL certificates in the development environment. The changes include:

  1. Updating the nginx/default.dev.conf file to use locally generated SSL certificates.
  2. Adding new certificate files (localhost+2.pem and localhost+2-key.pem) to the nginx/certs/ directory.

These changes will allow developers to run the application locally with HTTPS support, improving the local development experience and making it more closely match the production environment.

Type ✨

  • Bug fix
  • New feature
  • Improvement
  • Breaking change
  • Documentation

Tests 🛠️

To test these changes:

  1. Install mkcert if you haven't already (installation instructions vary by OS).

  2. Generate local certificates using mkcert:

    mkcert -install
    cd nginx/certs/
    mkcert localhost 127.0.0.1 ::1
  3. Verify that the nginx/default.dev.conf file has been updated with the correct certificate paths:

    ssl_certificate /etc/nginx/certs/localhost+2.pem;
    ssl_certificate_key /etc/nginx/certs/localhost+2-key.pem;
  4. Run the application locally using Docker Compose with the development configuration:

    docker-compose -f docker-compose.dev.yml up
  5. Access the application via HTTPS (https://localhost) and confirm that there are no certificate warnings in the browser.

  6. Verify that the application functions correctly over HTTPS.


Shubhom Srivastava added 2 commits October 6, 2024 12:08
use mkcert to generate local SSL certificates inside the nginx/certs
directory, and then path binded that directory to /etc/nginx/certs
directory inside the container, which I added in the nginx's
default.dev.conf
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.

1 participant