^
This commit is contained in:
parent
efa3b55b23
commit
53c820d719
2 changed files with 31 additions and 33 deletions
|
@ -620,9 +620,11 @@ wait
|
||||||
# Build the emails
|
# Build the emails
|
||||||
npm run build-emails
|
npm run build-emails
|
||||||
wait
|
wait
|
||||||
# Run the uwsgi socket and create it for the first time
|
# Set ownership of the app directory to $UN:www-data
|
||||||
uwsgi --ini $HD/saleor/saleor/wsgi/uwsgi.ini --pidfile $HD/saleortemp.pid
|
sudo chown -R $UN:www-data $HD/saleor
|
||||||
wait
|
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
|
sleep 5
|
||||||
# Stop the uwsgi processes
|
# Stop the uwsgi processes
|
||||||
uwsgi --stop $HD/saleortemp.pid
|
uwsgi --stop $HD/saleortemp.pid
|
||||||
|
@ -632,7 +634,6 @@ deactivate
|
||||||
sudo mv $HD/saleor/saleor$STATIC_URL /var/www/${HOST}${STATIC_URL}
|
sudo mv $HD/saleor/saleor$STATIC_URL /var/www/${HOST}${STATIC_URL}
|
||||||
sudo chown -R www-data:www-data /var/www/$HOST
|
sudo chown -R www-data:www-data /var/www/$HOST
|
||||||
sudo chmod -R 776 /var/www/$HOST
|
sudo chmod -R 776 /var/www/$HOST
|
||||||
sudo chown -R $UN:www-data $HD/saleor
|
|
||||||
#########################################################################################
|
#########################################################################################
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,32 +1,29 @@
|
||||||
[uwsgi]
|
[uwsgi]
|
||||||
die-on-term = true
|
die-on-term = true
|
||||||
enable-threads = true
|
enable-threads = true
|
||||||
http = :$(PORT)
|
log-format = UWSGI uwsgi "%(method) %(uri) %(proto)" %(status) %(size) %(msecs)ms [PID:%(pid):Worker-%(wid)] [RSS:%(rssM)MB]
|
||||||
|
|
||||||
# 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
|
|
||||||
# daemonize uwsgi and write messages into given log
|
# daemonize uwsgi and write messages into given log
|
||||||
daemonize = {hd}/uwsgi-emperor.log
|
daemonize = {hd}/uwsgi-emperor.log
|
||||||
|
# enable uwsgi master process
|
||||||
log-format = UWSGI uwsgi "%(method) %(uri) %(proto)" %(status) %(size) %(msecs)ms [PID:%(pid):Worker-%(wid)] [RSS:%(rssM)MB]
|
master = true
|
||||||
max-requests = 100
|
max-requests = 100
|
||||||
memory-report = true
|
memory-report = true
|
||||||
|
module = saleor.wsgi:application
|
||||||
|
processes = 4
|
||||||
static-map = /static=/app/static
|
static-map = /static=/app/static
|
||||||
mimefile = /etc/mime.types
|
mimefile = /etc/mime.types
|
||||||
ignore-sigpipe = true
|
ignore-sigpipe = true
|
||||||
ignore-write-errors = true
|
ignore-write-errors = true
|
||||||
disable-write-exception = 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
|
Loading…
Reference in a new issue