mirror of
https://github.com/capricornxl/ad-password-self-service.git
synced 2025-11-10 20:16:10 +08:00
默认的
django=2.2 version
This commit is contained in:
23
docker-src/deb_requestment
Normal file
23
docker-src/deb_requestment
Normal file
@@ -0,0 +1,23 @@
|
||||
# common
|
||||
gcc
|
||||
cmake
|
||||
curl
|
||||
wget
|
||||
vim
|
||||
locales
|
||||
iputils-ping
|
||||
python3
|
||||
nginx
|
||||
|
||||
# mysql-client
|
||||
default-mysql-client
|
||||
default-libmysqlclient-dev
|
||||
|
||||
openssl
|
||||
libssl-dev
|
||||
libldap2-dev
|
||||
libsasl2-dev
|
||||
libkrb5-dev
|
||||
sqlite
|
||||
|
||||
sshpass
|
||||
28
docker-src/uwsgi.ini
Normal file
28
docker-src/uwsgi.ini
Normal file
@@ -0,0 +1,28 @@
|
||||
[uwsgi]
|
||||
http-socket = PWD_SELF_SERVICE_IP:PWD_SELF_SERVICE_PORT
|
||||
|
||||
chdir = PWD_SELF_SERVICE_HOME
|
||||
|
||||
module = pwdselfservice.wsgi:application
|
||||
|
||||
master = true
|
||||
|
||||
processes = 4
|
||||
|
||||
threads = 4
|
||||
|
||||
max-requests = 2000
|
||||
|
||||
chmod-socket = 755
|
||||
|
||||
vacuum = true
|
||||
|
||||
#设置缓冲
|
||||
post-buffering = 4096
|
||||
|
||||
#设置静态文件
|
||||
static-map = /static=PWD_SELF_SERVICE_HOME/static
|
||||
|
||||
#设置日志目录
|
||||
daemonize = PWD_SELF_SERVICE_HOME/log/uwsgi.log
|
||||
|
||||
50
docker-src/uwsgiserver
Normal file
50
docker-src/uwsgiserver
Normal file
@@ -0,0 +1,50 @@
|
||||
#!/bin/bash
|
||||
# Startup script for the uwsgi server
|
||||
# chkconfig: - 85 15
|
||||
# description: uwsgi server is Web Server
|
||||
# HTML files and CGI.
|
||||
# processname: uwsgiserver
|
||||
|
||||
INI="/opt/password-self-service/uwsgi.ini"
|
||||
UWSGI="/usr/local/bin/uwsgi"
|
||||
PSID=$(ps -ef | grep "password-self-service-uwsgi uWSGI master" | grep -v grep | awk '{print $2}')
|
||||
|
||||
if [ ! -n "$1" ]
|
||||
then
|
||||
content="Usages: $0 [start|stop|restart|status]"
|
||||
echo -e "\033[31m $content \033[0m"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ $1 = start ]
|
||||
then
|
||||
if [[ `eval $PSID` -gt 4 ]]
|
||||
then
|
||||
content="uWsgi is Running!"
|
||||
echo -e "\033[32m $content \033[0m"
|
||||
exit 0
|
||||
else
|
||||
$UWSGI --ini $INI
|
||||
content="Start uWsgi Service [OK]"
|
||||
echo -e "\033[32m $content \033[0m"
|
||||
fi
|
||||
|
||||
elif [ $1 = stop ];then
|
||||
kill -9 $PSID > /dev/null 2>&1
|
||||
content="Stop uWsgi Service [OK]"
|
||||
echo -e "\033[32m $content \033[0m"
|
||||
|
||||
elif [ $1 = restart ];then
|
||||
kill -9 $PSID > /dev/null 2>&1
|
||||
echo "Pls wait...."
|
||||
sleep 3s
|
||||
$UWSGI --ini $INI
|
||||
content="Restart uWsgi Service [OK]"
|
||||
echo -e "\033[32m $content \033[0m"
|
||||
|
||||
elif [ $1 = status ];then
|
||||
ps -ef | grep "password-self-service-uwsgi" | grep -v "grep"
|
||||
else
|
||||
content="Usages: $0 [start|stop|restart|status]"
|
||||
echo -e "\033[31m $content \033[0m"
|
||||
fi
|
||||
Reference in New Issue
Block a user