Konstantin Gründger 2019-09-01 13:11:36 +02:00
commit c2de9544f1
6 zmienionych plików z 95 dodań i 0 usunięć

Wyświetl plik

@ -0,0 +1,37 @@
server {
# listen on port 80 (http)
listen 80;
server_name _;
location / {
# redirect any requests to the same URL but on https
return 301 https://$host$request_uri;
}
}
server {
# listen on port 443 (https)
listen 443 ssl;
server_name _;
# location of the self-signed SSL certificate
ssl_certificate /home/ubuntu/ddb/certs/cert.pem;
ssl_certificate_key /home/ubuntu/ddb/certs/key.pem;
# write access and error logs to /var/log
access_log /var/log/ddb_access.log;
error_log /var/log/ddb_error.log;
location / {
# forward application requests to the gunicorn server
proxy_pass http://localhost:8000;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /static {
# handle static files directly, without forwarding to the application
alias /home/ubuntu/ddb/app/static;
expires 30d;
}
}

Wyświetl plik

@ -0,0 +1,15 @@
[program:celerybeat]
environment=OGN_CONFIG_MODULE='config/default.py'
command=/var/www/html/ogn-python/venv/bin/celery -A ogn_python.collect beat -l info
directory=/var/www/html/ogn-python
user=www-data
numprocs=1
stdout_logfile=/var/log/celery/beat.log
stderr_logfile=/var/log/celery/beat.log
autostart=true
autorestart=true
startsecs=10
; Causes supervisor to send the termination signal (SIGTERM) to the whole process group.
stopasgroup=true

Wyświetl plik

@ -0,0 +1,19 @@
[program:celery]
environment=OGN_CONFIG_MODULE='config/default.py'
command=/var/www/html/ogn-python/venv/bin/celery -A ogn_python.collect worker -l info
directory=/var/www/html/ogn-python
user=www-data
numprocs=1
stdout_logfile=/var/log/celery/worker.log
stderr_logfile=/var/log/celery/worker.log
autostart=true
autorestart=true
startsecs=10
; Need to wait for currently executing tasks to finish at shutdown.
; Increase this if you have very long running tasks.
stopwaitsecs = 600
; Causes supervisor to send the termination signal (SIGTERM) to the whole process group.
stopasgroup=true

Wyświetl plik

@ -0,0 +1,11 @@
[program:flower]
environment=OGN_CONFIG_MODULE='config/default.py'
command=/var/www/html/ogn-python/venv/bin/celery flower -A ogn_python.celery --port=1234 --url_prefix=flower --loglevel=debug
directory=/var/www/html/ogn-python
user=www-data
stderr_logfile=/var/log/celery/flower_err.log
stdout_logfile=/var/log/celery/flower_out.log
autostart=true
autorestart=true
startsecs=10

Wyświetl plik

@ -0,0 +1,7 @@
[program:ogn-feeder]
environment=OGN_CONFIG_MODULE='config/default.py'
command=/var/www/html/ogn-python/venv/bin/python -m flask gateway run
user=www-data
directory=/var/www/html/ogn-python/ogn_python
autostart=true
autorestart=true

Wyświetl plik

@ -0,0 +1,6 @@
[program:redmon]
command=/usr/local/bin/redmon --base-path /redmon/
user=root
directory=/var/www/html
autostart=true
autorestart=true