-
-
Notifications
You must be signed in to change notification settings - Fork 25
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
Nginx docker temp #700
Nginx docker temp #700
Conversation
…app depending on nginx
@ZacharyCChang0828 Thank you, I will try to look through it this afternoon. Related to issue #648 |
nginx/conf.d/1_webapp.conf
Outdated
@@ -0,0 +1,47 @@ | |||
#Modified from: https://itnext.io/docker-rails-puma-nginx-postgres-999cd8866b18 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
About the filename: files are sorted in lexical order, not numeric order, so this will not behave the way that you think it will.
01_file
02_file
09_file
10_file
1_file
11_file
50_file
99_file
The convention is to use two digits, and if the ordering doesn't matter, use 50_
to put it in the middle.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like the other files aren't following the normal convention, so I guess it doesn't matter that much. 1_
will sort before anything that begins with a letter of the alphabet.
nginx/conf.d/rate_limit.conf
Outdated
@@ -0,0 +1 @@ | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's supposed to be here?
@@ -0,0 +1 @@ | |||
client_max_body_size 10M; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can delete the .bak
files to reduce the distraction.
nginx/conf.d/1_webapp.conf
Outdated
@@ -0,0 +1,47 @@ | |||
#Modified from: https://itnext.io/docker-rails-puma-nginx-postgres-999cd8866b18 | |||
|
|||
upstream safecastapi { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would appreciate it if you could leave a comment on this pull request to describe where you made changes and what changes you made.
nginx/conf.d/1_webapp.conf
Outdated
server app:3000; | ||
} | ||
|
||
limit_req_zone $binary_remote_addr zone=one:10m rate=10r/s; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a good start, but, if it is possible, it would be best if we could add this configuration to a new file instead of modifying an existing one.
Closing out since this has been draft for quite some time and both folks involved aren't active at the monent. |
I moved the entire nginx configuration file into the repository and modified docker-compose so it now use it as it's volume.
blockips.conf is added to specify IPs to block.
1_webapp.conf contains rate limiting and configuration to connect nginx to the app.