Compare commits
1 Commits
master
...
feat/resto
| Author | SHA1 | Date | |
|---|---|---|---|
| 2b9f6567c1 |
@ -94,6 +94,14 @@
|
||||
when: (ma.ports is defined)
|
||||
loop_control:
|
||||
loop_var: ma
|
||||
|
||||
- name: add gitea port if any service has gitea_port defined
|
||||
set_fact:
|
||||
matrix_ports: "{{ matrix_ports | default([]) | union([ma.gitea_port]) }}"
|
||||
with_items: "{{ matrix }}"
|
||||
when: (ma.gitea_port is defined)
|
||||
loop_control:
|
||||
loop_var: ma
|
||||
|
||||
- include_tasks: ../../althost/tasks/compose.yml
|
||||
vars: # forcing since this role is included statically
|
||||
|
||||
@ -2,6 +2,12 @@ upstream ssh_{{ vhost.nodo | replace(".", "") }} {
|
||||
server {{ vhost.nodo }}:22;
|
||||
}
|
||||
|
||||
{% if vhost.gitea_port is defined %}
|
||||
upstream gitea_{{ vhost.nodo | replace(".", "") }} {
|
||||
server {{ vhost.nodo }}:{{ vhost.gitea_port }};
|
||||
}
|
||||
{% endif %}
|
||||
|
||||
server {
|
||||
listen {{ vhost.ports[0] }};
|
||||
|
||||
@ -12,4 +18,18 @@ server {
|
||||
{% endif %}
|
||||
|
||||
proxy_pass ssh_{{ vhost.nodo | replace(".", "") }};
|
||||
}
|
||||
}
|
||||
|
||||
{% if vhost.gitea_port is defined %}
|
||||
server {
|
||||
listen {{ vhost.gitea_port }};
|
||||
|
||||
{% if vhost.root | default(false) %}
|
||||
server_name {{ vhost.domains | join(' ') }};
|
||||
{% else %}
|
||||
server_name .{{ vhost.domains | join(' .') }};
|
||||
{% endif %}
|
||||
|
||||
proxy_pass gitea_{{ vhost.nodo | replace(".", "") }};
|
||||
}
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user