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

Add a reverse proxy template #12

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

goetzk
Copy link
Contributor

@goetzk goetzk commented May 9, 2020

After asking in #11 I decided to just publish my config to help others easily
deploy a reverse proxy.

After asking in weareinteractive#11 I decided to just publish my config to help others easily
deploy a reverse proxy.
@goetzk goetzk mentioned this pull request May 9, 2020
@goetzk
Copy link
Contributor Author

goetzk commented May 9, 2020

Outstanding issues:

  • proper testing
  • Where to document its usage, noting that the template becomes mandatory
  • (might be able to change template if proxy_pass is set?)
  • decide if client_max_body_size needs to be a variable
  • possibly those listen directives, but the config is meant to have automatic upgrade to https so being able to customise them doesn't necessarily make sense.

@franklinkim
Copy link
Member

Hi, thanks for the PR.

  • documentation should be placed within default/main.yml if possible

I would suggest adding a new top level object nginx_proxies with options similar to nginx_sites. Thus you can provide a simple working revers proxy template with the least configuration given the possibility to override it with item.template. Maybe add an additional item.options dictionary where custom configuration can go.

Somewhat based on feedback in PR, a number of changes.
@goetzk
Copy link
Contributor Author

goetzk commented May 11, 2020

I've expanded in that direction, but not completed the work (or performed further testing) yet.

This has been used to deploy a site now; the following changes were made as
part of that process.
@goetzk goetzk changed the title WIP: Add a reverse proxy template Add a reverse proxy template May 17, 2020
@goetzk
Copy link
Contributor Author

goetzk commented May 17, 2020

@franklinkim
I'm hoping you can have another look at this and provide any follow up comments.

There appears to be a CI fail which I haven't looked at yet however I've just used this role to a reverse proxy so its had one successful use.

An outstanding feature might be to automatically load the proxies template if none is specified; not sure what you think about that?

@franklinkim
Copy link
Member

Hi, I took another look and merged / modified your PR here.

Couple of things:

  • your template didn't work if you're not using ssl
  • made proxies template similar to sites
  • made the default proxy template should be as simple as possible
  • you can add additional configurations through item.append, item.rules (letsencrypt) or a custom template

Let me know if this will work for you before I release it. THX

@franklinkim
Copy link
Member

@goetzk were you able to find some time to check out the modified branch?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants