Added configuration files for deployment.
This commit is contained in:
parent
e6e440d9cd
commit
46db2ec2d6
40
conf/nginx.conf
Normal file
40
conf/nginx.conf
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
listen 443 default_server ssl;
|
||||||
|
|
||||||
|
ssl_certificate /var/sites/ianonavy.com/ssl/unified.crt;
|
||||||
|
ssl_certificate_key /var/sites/ianonavy.com/ssl/ssl-decrypted.key;
|
||||||
|
|
||||||
|
server_name *.ianonavy.com ianonavy.com www.ianonavy.com;
|
||||||
|
|
||||||
|
access_log /var/log/nginx/ianonavy.access.log;
|
||||||
|
error_log /var/log/nginx/ianonavy.error.log;
|
||||||
|
|
||||||
|
if ($host != 'ianonavy.com') {
|
||||||
|
rewrite ^/(.*)$ http://ianonavy.com/$1 permanent;
|
||||||
|
}
|
||||||
|
|
||||||
|
root /var/sites/ianonavy.com/www;
|
||||||
|
|
||||||
|
location = /robots.txt {
|
||||||
|
alias /var/www/robots/all/robots.txt;
|
||||||
|
}
|
||||||
|
|
||||||
|
location /static/ { # STATIC_URL
|
||||||
|
alias /var/sites/ianonavy.com/www/src/static/; # STATIC_ROOT
|
||||||
|
expires off;
|
||||||
|
}
|
||||||
|
|
||||||
|
location = /google9677fb7678857b96.html {
|
||||||
|
rewrite ^/(.*) $1;
|
||||||
|
return 200 "google-site-verification: google9677fb7678857b96.html";
|
||||||
|
}
|
||||||
|
|
||||||
|
location / { try_files $uri @ianonavy; }
|
||||||
|
location @ianonavy {
|
||||||
|
include fastcgi_params;
|
||||||
|
fastcgi_param PATH_INFO $fastcgi_script_name;
|
||||||
|
fastcgi_param SCRIPT_NAME "";
|
||||||
|
fastcgi_pass unix:/tmp/ianonavy-fcgi.sock;
|
||||||
|
}
|
||||||
|
}
|
||||||
24
conf/supervisord.conf
Normal file
24
conf/supervisord.conf
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
[fcgi-program:ianonavy]
|
||||||
|
command=/var/sites/ianonavy.com/www/src/ianonavy.fcgi
|
||||||
|
socket=unix:///tmp/ianonavy-fcgi.sock
|
||||||
|
process_name=%(program_name)s_%(process_num)02d
|
||||||
|
directory=/var/sites/ianonavy.com/www/src
|
||||||
|
environment=PATH="/var/sites/ianonavy.com/www/bin"
|
||||||
|
numprocs=5
|
||||||
|
priority=999
|
||||||
|
autostart=true
|
||||||
|
autorestart=true
|
||||||
|
startsecs=1
|
||||||
|
startretries=3
|
||||||
|
exitcodes=0,2
|
||||||
|
stopsignal=QUIT
|
||||||
|
stopwaitsecs=10
|
||||||
|
user=app
|
||||||
|
redirect_stderr=true
|
||||||
|
stdout_logfile=/tmp/ianonavy.log
|
||||||
|
stdout_logfile_maxbytes=1MB
|
||||||
|
stdout_logfile_backups=10
|
||||||
|
stderr_logfile=/tmp/ianonavy_err.log
|
||||||
|
stderr_logfile_maxbytes=1MB
|
||||||
|
stderr_logfile_backups=10
|
||||||
|
|
||||||
2
requirements.txt
Normal file
2
requirements.txt
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
Flask
|
||||||
|
flup
|
||||||
6
src/ianonavy.fcgi
Executable file
6
src/ianonavy.fcgi
Executable file
@ -0,0 +1,6 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
from flup.server.fcgi import WSGIServer
|
||||||
|
from server import app
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
WSGIServer(app, bindAddress='/tmp/ianonavy-fcgi.sock', umask=0002).run()
|
||||||
Loading…
x
Reference in New Issue
Block a user