Skip to content

HTTP/2 and HTTPS support #6

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 2 commits into from
Oct 19, 2017
Merged

HTTP/2 and HTTPS support #6

merged 2 commits into from
Oct 19, 2017

Conversation

dunglas
Copy link
Owner

@dunglas dunglas commented Oct 19, 2017

Just open https://localhost.

  • The HTTP/2 reverse proxy is not secure and is not suited for production usage. Prefer using CloudFlare or the reverse proxy provided by your cloud platform in production.
  • Apache is used instead of Nginx as reverse proxy because Nginx doesn't support HTTP/2 Push yet bot Apache does (and this feature is present in Symfony: WebLink component)

Dockerfile Outdated

WORKDIR /srv/app
RUN php -r "copy('$SKELETON_COMPOSER_JSON', 'composer.json');" \

Choose a reason for hiding this comment

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

I think you could use ADD here

Copy link
Owner Author

Choose a reason for hiding this comment

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

No because the file is not included in the repo. But I’ll switch to composer create-project in another PR.

Choose a reason for hiding this comment

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

? ADD works with remote urls...

Copy link
Owner Author

Choose a reason for hiding this comment

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

I wasn't aware of that! great

Copy link

@greg0ire greg0ire Oct 19, 2017

Choose a reason for hiding this comment

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

Yeah I was pretty happy too when I realised I didn't actually need curl or wget :) or php -r

Choose a reason for hiding this comment

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

Yes but from what I remember ADD cannot be cached as a layer by docker so it's quite a pain when you are rebuilding your image a lot. Perhaps it is not the case anymore.

Copy link
Owner Author

Choose a reason for hiding this comment

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

I think I've found a better way (no more copy nor ADD).

-signkey /usr/local/apache2/conf/server.key \
-out /usr/local/apache2/conf/server.crt

COPY ./docker/httpd/httpd.conf /usr/local/apache2/conf/httpd.conf

Choose a reason for hiding this comment

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

You could maybe use here a multi stage build, first stage will create the certificate, second step will only copy them to apache so no need to have openssl as a dependency (unless it's required for apache to do https ?)

Choose a reason for hiding this comment

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

Doing so would allow you do avoid all these && because you wouldn't care about having many layers anymore. 👍

Copy link
Owner Author

Choose a reason for hiding this comment

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

Excellent idea @joelwurtz. It's done.

@dunglas dunglas force-pushed the h2 branch 2 times, most recently from f506e0f to 019748f Compare October 19, 2017 14:00
@dunglas dunglas merged commit f4ee1f1 into master Oct 19, 2017
@dunglas dunglas deleted the h2 branch October 19, 2017 14:47
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.

5 participants