Skip to content

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

Merged
merged 1 commit into from
Jun 26, 2018
Merged

Reverse proxy with nginx #21

merged 1 commit into from
Jun 26, 2018

Conversation

maxhelias
Copy link
Collaborator

Replace the reverse proxy with nginx

Copy link
Owner

@dunglas dunglas left a 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
Copy link
Owner

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


ssl_certificate /etc/nginx/ssl/server.crt;
ssl_certificate_key /etc/nginx/ssl/server.key;
ssl_session_cache builtin:1000 shared:SSL:10m;
Copy link
Owner

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).

@dunglas
Copy link
Owner

dunglas commented Jun 22, 2018

@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
Copy link
Contributor

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?

Copy link
Owner

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)

Copy link
Contributor

@ajardin ajardin Jun 22, 2018

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. 😄

@maxhelias
Copy link
Collaborator Author

@dunglas it's good 😃

@B-Galati
Copy link

What about doing the same thing in the Dockerfile.nginx ?
Would it be wrong or impossible ?

@maxhelias
Copy link
Collaborator Author

@B-Galati It is not secure for use in production because it is a self-generated certificate.
We use the h2-proxy service only for development

@B-Galati
Copy link

@maxhelias Thanks for your answer.

Considering a development environment only, does it make sense to keep both nginx and h2-proxy service while nginx could do both ?

@maxhelias
Copy link
Collaborator Author

@B-Galati Yes, if you use it only in development you can configure your h2 directly in the nginx service.

@B-Galati
Copy link

Alright thank you. I guess this repo is meant for production images then 👍

@maxhelias
Copy link
Collaborator Author

With the current configuration, you can use it in both cases.
Just pay attention to the docker-compose's comments about the production before pushing the images

@dunglas dunglas merged commit 6a34874 into dunglas:master Jun 26, 2018
@dunglas
Copy link
Owner

dunglas commented Jun 26, 2018

Thanks @maxhelias!

@maxhelias maxhelias deleted the proxy-nginx branch June 26, 2018 07:42
VitaliyMinenko pushed a commit to VitaliyMinenko/notofication-service that referenced this pull request Sep 16, 2024
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.

4 participants