Добавил conf-файлы для выкатывания на production #27
This commit is contained in:
parent
f64b60bffa
commit
0690968771
23
conf/gunicorn_start
Normal file
23
conf/gunicorn_start
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
NAME="crossposting"
|
||||||
|
DIR=/home/redex2000/crossposting/backend/current
|
||||||
|
USER=redex2000
|
||||||
|
GROUP=redex2000
|
||||||
|
WORKERS=3
|
||||||
|
BIND='0.0.0.0:8888'
|
||||||
|
DJANGO_SETTINGS_MODULE=crossposting_backend.settings
|
||||||
|
VENV_DIR=/home/redex2000/crossposting/backend/shared/crossposting_env/bin
|
||||||
|
LOG_LEVEL=error
|
||||||
|
cd $VENV_DIR
|
||||||
|
source ./activate
|
||||||
|
export DJANGO_SETTINGS_MODULE=$DJANGO_SETTINGS_MODULE
|
||||||
|
export PYTHONPATH=$DIR:$PYTHONPATH
|
||||||
|
exec ./gunicorn crossposting_backend.wsgi:application \
|
||||||
|
--name $NAME \
|
||||||
|
--workers $WORKERS \
|
||||||
|
--user=$USER \
|
||||||
|
--group=$GROUP \
|
||||||
|
--bind=$BIND \
|
||||||
|
--log-level=$LOG_LEVEL \
|
||||||
|
--log-file=-
|
11
conf/nginx/crossposting.conf
Normal file
11
conf/nginx/crossposting.conf
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
server {
|
||||||
|
listen 8989;
|
||||||
|
server_name zakonvremeni.ru;
|
||||||
|
access_log /var/log/nginx/crossposting/access.log;
|
||||||
|
error_log /var/log/nginx/crossposting/error.log error;
|
||||||
|
root /home/redex2000/crossposting/backend/current;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
proxy_pass http://localhost:8888;
|
||||||
|
}
|
||||||
|
}
|
10
conf/supervisor/conf.d/crossposting_django.conf
Normal file
10
conf/supervisor/conf.d/crossposting_django.conf
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
[program:crossposting_django]
|
||||||
|
command=/home/redex2000/crossposting/backend/shared/crossposting_env/bin/gunicorn_start
|
||||||
|
directory=/home/redex2000/crossposting/backend/current
|
||||||
|
user=redex2000
|
||||||
|
autorestart=true
|
||||||
|
redirect_stderr=true
|
||||||
|
stdout_logfile = /var/log/supervisor/crossposting/out.log
|
||||||
|
stderr_logfile = /var/log/supervisor/crossposting/err.log
|
||||||
|
startsecs=10
|
||||||
|
startretries=5
|
Loading…
x
Reference in New Issue
Block a user