This commit is contained in:
Vague Rabbit 2021-02-04 21:15:44 -08:00
parent efa3b55b23
commit 53c820d719
2 changed files with 31 additions and 33 deletions

View file

@ -620,9 +620,11 @@ wait
# Build the emails
npm run build-emails
wait
# Run the uwsgi socket and create it for the first time
uwsgi --ini $HD/saleor/saleor/wsgi/uwsgi.ini --pidfile $HD/saleortemp.pid
# Set ownership of the app directory to $UN:www-data
sudo chown -R $UN:www-data $HD/saleor
wait
# Run the uwsgi socket and create it for the first time
sudo uwsgi --ini $HD/saleor/saleor/wsgi/uwsgi.ini --uid www-data --gid www-data --pidfile $HD/saleortemp.pid
sleep 5
# Stop the uwsgi processes
uwsgi --stop $HD/saleortemp.pid
@ -632,7 +634,6 @@ deactivate
sudo mv $HD/saleor/saleor$STATIC_URL /var/www/${HOST}${STATIC_URL}
sudo chown -R www-data:www-data /var/www/$HOST
sudo chmod -R 776 /var/www/$HOST
sudo chown -R $UN:www-data $HD/saleor
#########################################################################################

View file

@ -1,32 +1,29 @@
[uwsgi]
die-on-term = true
enable-threads = true
http = :$(PORT)
# full path to Django project's root directory
chdir = {hd}/saleor/
# Django's wsgi file
module = saleor.wsgi:application
# full path to python virtual env
home = {hd}/env/saleor
# enable uwsgi master process
master = true
# maximum number of worker processes
processes = 4
# the socket (use the full path to be safe
socket = {hd}/saleor/saleor.sock
# socket permissions
chmod-socket = 666
# clear environment on exit
vacuum = true
log-format = UWSGI uwsgi "%(method) %(uri) %(proto)" %(status) %(size) %(msecs)ms [PID:%(pid):Worker-%(wid)] [RSS:%(rssM)MB]
# daemonize uwsgi and write messages into given log
daemonize = {hd}/uwsgi-emperor.log
log-format = UWSGI uwsgi "%(method) %(uri) %(proto)" %(status) %(size) %(msecs)ms [PID:%(pid):Worker-%(wid)] [RSS:%(rssM)MB]
# enable uwsgi master process
master = true
max-requests = 100
memory-report = true
module = saleor.wsgi:application
processes = 4
static-map = /static=/app/static
mimefile = /etc/mime.types
ignore-sigpipe = true
ignore-write-errors = true
disable-write-exception = true
# Modifications
socket = {hd}/saleor/saleor.sock
# socket permissions
chown-socket = ubuntu:www-data
chmod-socket = 660
strict = true
need-app = true
uid = {un}
# full path to python virtual env
home = {hd}/env/saleor
# full path to Django project's root directory
chdir = {hd}/saleor/saleor/core