second commit

This commit is contained in:
pvincent
2024-02-21 23:32:34 +04:00
parent 9a4551ca3a
commit 7cdc45397d
82 changed files with 7172 additions and 6 deletions
+16
View File
@@ -0,0 +1,16 @@
# DEFAULT SERVER
# redirect any http request to https
server {
listen 80;
server_name _;
return 301 https://$host$request_uri;
}
# respond dummy nginx page
server {
listen 443 default_server ssl;
include snippets/snakeoil.conf;
root /var/www/html;
index index.html index.htm index.nginx-debian.html;
}
+37
View File
@@ -0,0 +1,37 @@
{% for service in expanded.services %}
server {
listen 443 http2 ssl;
server_name {{ service.fqdn }};
{%- if target == 'dev' %}
include snippets/snakeoil.conf;
{%- else %}
ssl_certificate /etc/letsencrypt/live/{{ service.domain }}/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/{{ service.domain }}/privkey.pem;
{%- endif %}
location / {
proxy_pass http://{{ service.container }}:{{ service.port }};
{%- if service.app == 'odoo15' %}
client_max_body_size 5M;
{%- endif %}
proxy_http_version 1.1;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
{%- if target != 'prod' %}
include snippets/banner_{{ target }}.conf;
{%- endif %}
}
{%- if service.app == 'odoo15' or service.app == 'odoo12' %}
location /longpolling {
proxy_pass http://{{ service.container }}:{{ service.port + 1000 }};
}
{%- endif %}
}
{% endfor %}
+67
View File
@@ -0,0 +1,67 @@
proxy_set_header Accept-Encoding "";
subs_filter '</body>' '
<div class="betabanner_box">
<div class="betabanner_ribbon"><span>BETA</span></div>
</div>
<style>
.betabanner_box {
height: 100%;
position: absolute;
bottom: 0;
pointer-events: none;
opacity: 0.7;
}
.betabanner_ribbon {
position: fixed;
left: -5px;
bottom : 0;
z-index: 9999;
overflow: hidden;
width: 75px; height: 75px;
text-align: right;
}
.betabanner_ribbon span {
font-size: 10px;
font-weight: bold;
color: #FFF;
text-transform: uppercase;
text-align: center;
line-height: 20px;
transform: rotate(45deg);
-webkit-transform: rotate(45deg);
width: 100px;
display: block;
background: #79A70A;
background: linear-gradient(#ABC900 30%, #79A70A 61%);
box-shadow: 5px 9px 27px -4px rgba(0, 0, 0, 1);
position: absolute;
bottom: 16px;
left: -21px;
}
.betabanner_ribbon span::before {
content: "";
position: absolute; left: 0px; top: 100%;
z-index: -1;
border-left: 3px solid #79A70A;
border-right: 3px solid transparent;
border-bottom: 3px solid transparent;
border-top: 3px solid #79A70A;
}
.betabanner_ribbon span::after {
content: "";
position: absolute; right: 0px; top: 100%;
z-index: -1;
border-left: 3px solid transparent;
border-right: 3px solid #79A70A;
border-bottom: 3px solid transparent;
border-top: 3px solid #79A70A;
}
</style>
</body>
';
+65
View File
@@ -0,0 +1,65 @@
proxy_set_header Accept-Encoding "";
subs_filter '</body>' '
<div class="betabanner_box">
<div class="betabanner_ribbon"><span>DEV</span></div>
</div>
<style>
.betabanner_box {
height: 100%;
position: absolute;
bottom: 0;
pointer-events: none;
opacity: 0.7;
}
.betabanner_ribbon {
position: fixed;
left: -5px;
bottom : 0;
z-index: 9999;
overflow: hidden;
width: 75px; height: 75px;
text-align: right;
}
.betabanner_ribbon span {
font-size: 10px;
font-weight: bold;
color: #FFF;
text-transform: uppercase;
text-align: center;
line-height: 20px;
transform: rotate(45deg);
-webkit-transform: rotate(45deg);
width: 100px;
display: block;
background: linear-gradient(lightblue 30%, blue 81%);
box-shadow: 5px 9px 27px -4px rgba(0, 0, 0, 1);
position: absolute;
bottom: 16px;
left: -21px;
}
.betabanner_ribbon span::before {
content: "";
position: absolute; left: 0px; top: 100%;
z-index: -1;
border-left: 3px solid #79A70A;
border-right: 3px solid transparent;
border-bottom: 3px solid transparent;
border-top: 3px solid #79A70A;
}
.betabanner_ribbon span::after {
content: "";
position: absolute; right: 0px; top: 100%;
z-index: -1;
border-left: 3px solid transparent;
border-right: 3px solid #79A70A;
border-bottom: 3px solid transparent;
border-top: 3px solid #79A70A;
}
</style>
</body>
';