correction eolisation

This commit is contained in:
Emmanuel Garette 2020-10-19 15:15:13 +02:00
parent c2314b65ea
commit 0c3da22a1f
5 changed files with 19 additions and 24 deletions

View File

@ -4,7 +4,7 @@
<!--service>lemur</service-->
<file name='/etc/lemur/lemur.conf.py' mkdir='True'/>
<file name='/etc/eole/eole-db.d/lemur.yml'/>
<file name='/etc/nginx/sites-enabled/lemur' source='nginx-lemur'/>
<file name='/etc/nginx/web.d/lemur.conf' source='nginx-lemur.conf'/>
</files>
<variables>
<family name='lemur'>

View File

@ -1,5 +1,6 @@
from secrets import token_bytes as _token_bytes
from base64 import urlsafe_b64encode as _urlsafe_b64encode
def gen_random_base64():
return base64.urlsafe_b64encode(secrets.token_bytes(32)).decode()
return _urlsafe_b64encode(_token_bytes(32)).decode()

View File

@ -1,5 +1,4 @@
%from os import listdir
%set %%dbname = %lemur_db_name
%set %%dbname = %%lemur_db_name
---
dbuser: %%lemur_db_user
dbuser_options:

View File

@ -1,20 +0,0 @@
server {
listen 80 default_server;
listen [::]:80 default_server;
location /lemur/api {
proxy_pass http://127.0.0.1:8002/api;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
proxy_redirect off;
proxy_buffering off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /lemur {
root /usr/share/lemur/static;
include mime.types;
index index.html;
}
}

15
tmpl/nginx-lemur.conf Normal file
View File

@ -0,0 +1,15 @@
location /lemur/api {
proxy_pass http://127.0.0.1:8002/api;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
proxy_redirect off;
proxy_buffering off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /lemur/ {
alias /usr/share/lemur/static/;
include mime.types;
index index.html;
}