-
-
Notifications
You must be signed in to change notification settings - Fork 835
Reverse proxy with nginx #21
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
Conversation
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.
Great than you, I left some minor comments.
COPY ./docker/httpd/httpd.conf /usr/local/apache2/conf/httpd.conf | ||
RUN mkdir -p /etc/nginx/ssl/ | ||
COPY --from=0 server.key server.crt /etc/nginx/ssl/ | ||
COPY ./docker/h2-proxy/default.conf /etc/nginx/conf.d/default.conf |
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.
Missing blank line at the end
docker/h2-proxy/default.conf
Outdated
|
||
ssl_certificate /etc/nginx/ssl/server.crt; | ||
ssl_certificate_key /etc/nginx/ssl/server.key; | ||
ssl_session_cache builtin:1000 shared:SSL: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.
I wouldn't change the default value (as this container is only intended for dev, we can keep the config minimal).
@teohhanhui, would you mind reviewing this one? |
@@ -35,6 +35,6 @@ services: | |||
context: . | |||
dockerfile: ./Dockerfile.h2-proxy | |||
volumes: | |||
- ./docker/httpd/httpd.conf:/usr/local/apache2/conf/httpd.conf:ro | |||
- ./docker/h2-proxy/default.conf:/etc/nginx/conf.d/default.conf:ro |
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.
As the file seems to be copied during the image building, is it really needed?
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.
Yes. Copying is for prod, the volume is for dev (you change the file, reboot the service and it's taken into account without having to rebuild the image)
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.
That's my first guess, forget that. 😄
@dunglas it's good 😃 |
What about doing the same thing in the Dockerfile.nginx ? |
@B-Galati It is not secure for use in production because it is a self-generated certificate. |
@maxhelias Thanks for your answer. Considering a development environment only, does it make sense to keep both |
@B-Galati Yes, if you use it only in development you can configure your h2 directly in the nginx service. |
Alright thank you. I guess this repo is meant for production images then 👍 |
With the current configuration, you can use it in both cases. |
Thanks @maxhelias! |
Reverse proxy with nginx
Replace the reverse proxy with nginx