-
Notifications
You must be signed in to change notification settings - Fork 42
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
Pheonix Elixir Upstreams ? #157
Comments
The explanation on their site is totally unreadable. Did you recreate the |
the obvious question is where do I put the nginx config into a debops-nginx role? I am not even sure what variable I use? |
a couple of examples of Ansible Phoenix alternatives |
Since I assume that you are writing a role for phoenix__fqdn: 'phoenix.{{ ansible_domain }}'
phoenix__nginx__dependent_upstreams:
- name: 'phoenix_upstream'
server: 'localhost:4000'
phoenix__nginx__dependent_servers:
- filename: 'phoenix'
name: '{{ phoenix__fqdn }}'
type: 'proxy'
proxy_pass: 'http://phoenix_upstream'
proxy_options: |
proxy_redirect off; Stick these in the - name: Configure Phoenix
hosts: phoenix-hosts
become: True
roles:
- role: debops.apt_preferences
tags: [ 'role::apt_preferences' ]
apt_preferences__dependent_list:
- '{{ nginx__apt_preferences__dependent_list }}'
- role: debops.ferm
tags: [ 'role::ferm' ]
ferm__dependent_rules:
- '{{ nginx__ferm__dependent_rules }}'
- role: debops.nginx
tags: [ 'role::nginx' ]
nginx__dependent_upstreams:
- '{{ phoenix__nginx__dependent_upstreams }}'
nginx__dependent_servers:
- '{{ phoenix__nginx__dependent_servers }}'
- role: phoenix
tags: [ 'role::phoenix' ] That should do the trick. If you stick with using the TCP port for the application instead of the UNIX socket, I suggest using |
thanks, I'll try to bang out a debops-lite phoenix role during the week |
@niccolox Great. I've added the |
tx, doing first pass now |
thanks for this, have an OK first version running how do I add two ACME certs for two upstreams on the same server? do I add config to the role stubbed above or add inventory settings? I have example.com and example.org both on the same server and within the same phoenix umbrella app happy to share access to private repo if thats helpful I haven't generalized this yet ... thanks |
ok, I think I am stuck in a catch 22 i.e. I need to run the elixir/phoenix cowboy server AND nginx running passthrough for ACME registration and also the ACME challenge/response file needs to be in the cowboy server as this is where the files are being loaded from and not nginx which is acting as a passthrough I am looking at the wordpress debops contrib role and see that has a task specific to acme and I may need to run something like this for elixir/phoenix/cowboy and nginx as proxy |
this is the inventory host
this is the role main
needless to say, this doesn't work, LE Acme fails because it cant fine the acme challenge
also, the FQDN root domain is not for working example.com it redirects to www.example.com I feel like it may be some config clash with the default domain spent the weekend on this, will come back to it during the week |
Is the DNS correctly configured? Remember that the zone propagation might take some time. Check from multiple locations if your websites can be correctly resolved. |
I fixed the dns, thanks for the tip
I am stuck on the acme challenge / response step
Need to custom config phoenix static files and integrate with the acme tiny
script
Is there an inventory host variable I can use that sends the acme challenge
file to a phoenix static folder?
…On Apr 17, 2017 3:18 AM, "Maciej Delmanowski" ***@***.***> wrote:
Is the DNS correctly configured? Remember that the zone propagation might
take some time. Check from multiple locations if your websites can be
correctly resolved.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#157 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAbsppT0drBV8JXdg9ruu3YZhj21Y-zYks5rwzxogaJpZM4M4XME>
.
|
trying to work out how to configure debops-nginx with an Elixir / Phoenix app as upstream?
http://www.phoenixframework.org/docs/serving-your-application-behind-a-proxy
Phoenix generally runs on port 4000 but I actually want to have a number of apps and domains running with the same nginx as proxy
apologies if I am missing something super obvious
The text was updated successfully, but these errors were encountered: