nginx proxy, gitea proxied
parent
5c6198a023
commit
56ffb39cc5
|
@ -1,5 +1,5 @@
|
|||
command: gitea -C . -w . -c ./custom/conf/app.ini
|
||||
consumes: postgresql
|
||||
consumes: postgresql, http?
|
||||
requires-domain: true
|
||||
|
||||
%directory ${SERVICE_ROOT}/custom/conf
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
command: nginx -c ${SERVICE_ROOT}/nginx.conf
|
||||
provides: www
|
||||
consumes: http?
|
||||
provides: www, http
|
||||
|
||||
%directory ${SERVICE_ROOT}/
|
||||
name: working directory
|
||||
|
|
|
@ -23,8 +23,8 @@ http {
|
|||
|
||||
{% for user in consumers["www"] %}
|
||||
server {
|
||||
listen {{ port(user.id) }} ;
|
||||
listen [::]:{{ port(user.id) }} ;
|
||||
listen {{ port(service.id) }} ;
|
||||
listen [::]:{{ port(service.id) }} ;
|
||||
server_name {{ user.domain }} ;
|
||||
|
||||
location / {
|
||||
|
@ -33,4 +33,18 @@ http {
|
|||
}
|
||||
{% endfor %}
|
||||
|
||||
{% for user in consumers["http"] %}
|
||||
server {
|
||||
listen {{ port(service.id) }};
|
||||
listen [::]:{{ port(service.id) }};
|
||||
server_name {{ user.domain }} *.{{ user.domain }};
|
||||
|
||||
location / {
|
||||
proxy_set_header Host $host;
|
||||
proxy_next_upstream_timeout 2s;
|
||||
proxy_pass http://127.0.0.1:{{ port(user.id) }}/;
|
||||
}
|
||||
}
|
||||
{% endfor %}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue