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(server): allow listening on unix socket through server.socket config #7824

Merged
merged 2 commits into from Sep 23, 2020

Conversation

admosity
Copy link
Contributor

This PR provides the ability to bind to a unix socket. This need came about from the default nginx build pack on heroku requiring to listen on a socket:

https://elements.heroku.com/buildpacks/heroku/heroku-buildpack-nginx#buildpack-instructions
image

This PR allows the instantiation of the server with the socket:

image

I can use server.port to achieve the same functionality, but the results are a little surprising (and it still works!):

image

…configuration

Signed-off-by: Adam Lee <duo1123@gmail.com>
@codecov
Copy link

codecov bot commented Sep 10, 2020

Codecov Report

Merging #7824 into master will increase coverage by 5.54%.
The diff coverage is 63.63%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7824      +/-   ##
==========================================
+ Coverage   27.16%   32.71%   +5.54%     
==========================================
  Files        1163     1194      +31     
  Lines       15518    12965    -2553     
  Branches     2410     1279    -1131     
==========================================
+ Hits         4216     4241      +25     
+ Misses       9534     7884    -1650     
+ Partials     1768      840     -928     
Flag Coverage Δ
#front 24.81% <70.00%> (+5.49%) ⬆️
#unit 53.85% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...admin/admin/src/components/ContainerFluid/index.js 75.00% <ø> (+8.33%) ⬆️
...in/src/components/LeftMenu/LeftMenuFooter/index.js 80.00% <0.00%> (+13.33%) ⬆️
...rc/containers/EditViewDataManagerProvider/index.js 0.00% <ø> (ø)
...tainers/EditViewDataManagerProvider/utils/index.js 0.00% <0.00%> (ø)
.../admin/src/components/ComponentIconPicker/index.js 0.00% <ø> (ø)
...agerProvider/utils/retrieveComponentsFromSchema.js 87.50% <ø> (+18.75%) ⬆️
...ugin-upload/admin/src/components/EditForm/index.js 0.00% <ø> (ø)
...rapi-plugin-upload/admin/src/translations/index.js 0.00% <0.00%> (ø)
packages/strapi-provider-upload-local/lib/index.js 29.16% <0.00%> (ø)
...ovider/utils/getFieldsActionMatchingPermissions.js 100.00% <100.00%> (ø)
... and 1078 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cd9296b...8e7ec90. Read the comment docs.

@alexandrebodin alexandrebodin added source: core:strapi Source is core/strapi package issue: enhancement Issue suggesting an enhancement to an existing feature labels Sep 15, 2020
@alexandrebodin
Copy link
Member

Hello @admosity hank you for this, it looks good to me. We are just going to ask you to add some documentation :) I think this should be added here: https://strapi.io/documentation/v3.x/concepts/configurations.html#server

Signed-off-by: Adam Lee <duo1123@gmail.com>
@admosity
Copy link
Contributor Author

@alexandrebodin Sure thing! Just added documentation.

@alexandrebodin alexandrebodin added this to the 3.2.0 milestone Sep 23, 2020
Copy link
Member

@alexandrebodin alexandrebodin left a comment

Choose a reason for hiding this comment

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

LGTM, Thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue: enhancement Issue suggesting an enhancement to an existing feature source: core:strapi Source is core/strapi package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants