Skip to content
Snippets Groups Projects
Commit 1583df53 authored by Bob Mottram's avatar Bob Mottram
Browse files

uwsgi package

parent 96ce8932
No related branches found
No related tags found
No related merge requests found
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
# Freedom in the Cloud # Freedom in the Cloud
# #
# etesync server # etesync server
# https://github.com/victor-rds/docker-etesync/blob/master/Dockerfile_debian.template
# #
# License # License
# ======= # =======
...@@ -150,9 +151,9 @@ function upgrade_etesync { ...@@ -150,9 +151,9 @@ function upgrade_etesync {
# update to the next commit # update to the next commit
set_repo_commit "/etc/etesync" "etesync commit" "$ETESYNC_COMMIT" "$ETESYNC_REPO" set_repo_commit "/etc/etesync" "etesync commit" "$ETESYNC_COMMIT" "$ETESYNC_REPO"
cd /etc/etesync || exit 368252 cd /etc/etesync || exit 368252
pip3 install -U -r requirements.txt pip3 install -U -r requirements.txt uwsgi
python3 manage.py migrate python3 manage.py migrate
chown -R etesync:etesync "/etc/etesync" chown -R etesync:etesync /etc/etesync
systemctl restart etesync systemctl restart etesync
} }
...@@ -316,7 +317,7 @@ function install_etesync { ...@@ -316,7 +317,7 @@ function install_etesync {
sed -i "s|ALLOWED_HOSTS =.*|ALLOWED_HOSTS = [ '${ETESYNC_DOMAIN_NAME}', '${ETESYNC_ONION_HOSTNAME}' ]|g" /etc/etesync/etesync_server/settings.py sed -i "s|ALLOWED_HOSTS =.*|ALLOWED_HOSTS = [ '${ETESYNC_DOMAIN_NAME}', '${ETESYNC_ONION_HOSTNAME}' ]|g" /etc/etesync/etesync_server/settings.py
pip3 install -r requirements.txt pip3 install -r requirements.txt uwsgi
python3 manage.py migrate python3 manage.py migrate
etesync_nginx_site=/etc/nginx/sites-available/$ETESYNC_DOMAIN_NAME etesync_nginx_site=/etc/nginx/sites-available/$ETESYNC_DOMAIN_NAME
...@@ -347,7 +348,10 @@ function install_etesync { ...@@ -347,7 +348,10 @@ function install_etesync {
echo ' # Location'; echo ' # Location';
echo ' location / {'; } >> "$etesync_nginx_site" echo ' location / {'; } >> "$etesync_nginx_site"
nginx_limits "$ETESYNC_DOMAIN_NAME" '75m' nginx_limits "$ETESYNC_DOMAIN_NAME" '75m'
{ echo " proxy_pass http://localhost:$ETESYNC_PORT_INTERNAL;"; { echo " proxy_set_header Authorization \$http_authorization;";
echo " proxy_set_header X-Forwarded-User \$remote_user;";
echo ' proxy_pass_header Authorization;';
echo " proxy_pass http://localhost:$ETESYNC_PORT_INTERNAL;";
echo ' }'; echo ' }';
echo '}'; } >> "$etesync_nginx_site" echo '}'; } >> "$etesync_nginx_site"
else else
...@@ -372,7 +376,10 @@ function install_etesync { ...@@ -372,7 +376,10 @@ function install_etesync {
echo ' # Location'; echo ' # Location';
echo ' location / {'; } >> "$etesync_nginx_site" echo ' location / {'; } >> "$etesync_nginx_site"
nginx_limits "$ETESYNC_DOMAIN_NAME" '75m' nginx_limits "$ETESYNC_DOMAIN_NAME" '75m'
{ echo " proxy_pass http://localhost:$ETESYNC_PORT_INTERNAL;"; { echo " proxy_set_header Authorization \$http_authorization;";
echo " proxy_set_header X-Forwarded-User \$remote_user;";
echo ' proxy_pass_header Authorization;';
echo " proxy_pass http://localhost:$ETESYNC_PORT_INTERNAL;";
echo ' }'; echo ' }';
echo '}'; } >> "$etesync_nginx_site" echo '}'; } >> "$etesync_nginx_site"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment