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

feat: Configure Puma server and Local docker-compose with HTTPS #445

Merged
merged 16 commits into from
Dec 4, 2023

Conversation

Quentinchampenois
Copy link
Contributor

@Quentinchampenois Quentinchampenois commented Oct 5, 2023

🎩 Description

Please describe your pull request.

This PR adds a new docker-compose specific for localhost. It is similar to the current docker-compose.yml but it is based on Dockerfile.local which runs application on SSL using self signed certificate

Also it allows to configure Puma webserver according to recommandations :

"Worker counts should be somewhere between 4 and 32 in most cases. You want more than 4 in order to minimize time spent in request queueing for a free Puma worker, but probably less than ~32 because otherwise autoscaling is working in too large of an increment or they probably won't fit very well into your nodes"

Testing

Describe the best way to test or validate your PR.

Tasks

  • Add Docker configuration
  • Add documentation
  • Fix letter opener not exposed
  • Fix Sidekiq not able to reach letter_opener
  • Add Puma configurations via env vars

Environment variables

  • PUMA_WORKERS Integer (def: -1) - if positive, set multi process on Puma
  • PUMA_MIN_THREADS Integer (def: 5) - Set number of minimum puma threads
  • PUMA_MAX_THREADS Integer (def: 5) - Set number of maximum puma threads
  • PUMA_PRELOAD_APP String/Bool (def: "false") - if "true" preloads app in Puma

@codecov
Copy link

codecov bot commented Oct 5, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (8462b84) 77.59% compared to head (280d3ff) 61.97%.
Report is 2 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff              @@
##           develop     #445       +/-   ##
============================================
- Coverage    77.59%   61.97%   -15.63%     
============================================
  Files           61       51       -10     
  Lines         1616     1336      -280     
============================================
- Hits          1254      828      -426     
- Misses         362      508      +146     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Quentinchampenois Quentinchampenois marked this pull request as ready for review October 9, 2023 15:39
@Quentinchampenois Quentinchampenois requested review from luciegrau, a team and AyakorK and removed request for a team October 11, 2023 08:08
@Quentinchampenois Quentinchampenois marked this pull request as draft October 26, 2023 12:55
@Quentinchampenois
Copy link
Contributor Author

Backport fixes from decidim-lyon

@moustachu moustachu added the release: v2.0 Candidate for 2.0.0 release label Oct 26, 2023
@moustachu moustachu added this to the v2.0.0 milestone Oct 26, 2023
@Quentinchampenois Quentinchampenois marked this pull request as ready for review October 30, 2023 14:06
@Quentinchampenois Quentinchampenois changed the title feat: Define local docker-compose with HTTPS feat: Configure Puma server and Local docker-compose with HTTPS Oct 30, 2023
@Quentinchampenois Quentinchampenois merged commit a1517c2 into develop Dec 4, 2023
15 of 16 checks passed
@Quentinchampenois Quentinchampenois deleted the feat/docker-compose-local branch December 4, 2023 17:40
moustachu pushed a commit that referenced this pull request Mar 6, 2024
* feat: Local docker-compose

* fix: Update make run command

* fix: Local docker-compose

* fix: Webpacker compilation

* fix: Local docker-compose

* fix: Docker-compose with https in local

* doc: Add Getting started with Docker in README

* fix: Add letter_opener gem to global scope

* feat: Add docker commands to Makefile

* fix: backport fix docker-compose

* refactor: Remove not needed entrypoint.local.sh

* feat: Generate SSL certificate in Dockerfile.local

* fix: Fine tuning puma on docker-compose local

* lint: Fix rubocop offense

* Update GETTING_STARTED_DOCKER.md

fix typo

---------

Co-authored-by: ailepet <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release: v2.0 Candidate for 2.0.0 release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants