Actually bind flask-admin to the mail servers
parent
61c99c7014
commit
48fbf737ce
@ -1,2 +1,4 @@
|
||||
Flask
|
||||
Flask-Admin
|
||||
Flask-SQLAlchemy
|
||||
uwsgi
|
||||
|
@ -1,7 +0,0 @@
|
||||
from freeposte import db, models
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
db.drop_all()
|
||||
db.create_all()
|
||||
db.session.commit()
|
@ -0,0 +1,28 @@
|
||||
user www-data;
|
||||
worker_processes 1;
|
||||
|
||||
error_log /var/log/nginx/error.log info;
|
||||
pid /var/run/nginx.pid;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
access_log /var/log/nginx/access.log;
|
||||
sendfile on;
|
||||
keepalive_timeout 65;
|
||||
server_tokens off;
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
|
||||
location /admin {
|
||||
include uwsgi_params;
|
||||
uwsgi_modifier1 30;
|
||||
uwsgi_pass unix:/var/run/freeposte.sock;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
dbpath = /data/freeposte.db
|
||||
query = \
|
||||
SELECT destination \
|
||||
FROM aliases INNER JOIN domains ON aliases.domain_id = domains.id \
|
||||
WHERE domains.name = '%d' \
|
||||
AND aliases.localpart = '%n'
|
||||
query =
|
||||
SELECT destination
|
||||
FROM alias INNER JOIN domain ON alias.domain_id = domain.id
|
||||
WHERE domain.name = '%d'
|
||||
AND alias.localpart = '%u'
|
||||
|
@ -1,2 +1,2 @@
|
||||
dbpath = /data/freeposte.db
|
||||
query = SELECT name FROM domains WHERE domain='%s'
|
||||
query = SELECT name FROM domain WHERE name='%s'
|
||||
|
@ -0,0 +1,16 @@
|
||||
uwsgi:
|
||||
socket: /var/run/freeposte.sock
|
||||
chown-socket: www-data:www-data
|
||||
pidfile: /var/run/freeposte.pid
|
||||
master: true
|
||||
workers: 2
|
||||
|
||||
vacuum: true
|
||||
plugins: python
|
||||
wsgi-file: /admin/run.py
|
||||
callable: app
|
||||
processes: 1
|
||||
pythonpath: /usr/lib/python2.7/site-packages
|
||||
pythonpath: /admin
|
||||
catch-exceptions: true
|
||||
post-buffering: 8192
|
Loading…
Reference in New Issue