Commit 3df43d4d authored by Alice Bonafé's avatar Alice Bonafé
Browse files
parents 9a76a6b8 9eb5c9a9
Showing with 50 additions and 4 deletions
+50 -4
......@@ -22,7 +22,7 @@ from .root import (
from configparser import ConfigParser
ALLOW_CORS = True
#ROOT_PATH = '/bbx'
#ROOT_PATH = '/api'
ROOT_PATH = ''
THUMBNAIL_WIDTH = 600
......
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
upstream backend {
server unix:/home/exu/bbx/run/unicorn_live.sock;
# server localhost:8080;
}
# Virtual Host configuration for example.com
#
# You can move that to a different file under sites-available/ and symlink that
# to sites-enabled/ to enable it.
#
server {
# listen 443 ssl;
# listen [::]:443 ssl;
listen 80;
server_name dev.baobaxia.net;
root /var/www/dev.baobaxia.net;
# index index.html;
# ssl_certificate /etc/ssl/localcerts/nginx.pem;
# ssl_certificate_key /etc/ssl/localcerts/nginx.key;
client_max_body_size 300M;
location / {
try_files $uri $uri/index.html @proxy_to_app;
}
location @proxy_to_app {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
# we don't want nginx trying to do something clever with
# redirects, we set the Host: header above already.
proxy_redirect off;
proxy_pass http://backend;
}
}
#!/bin/bash
# Pasta do projeto
PROJECTDIR=/home/exu/bbx/
PROJECTDIR=/home/exu/bbx/baobaxia-mucua
# Api instance module
ASGI_MODULE=baobaxia.acervo
PORT=8080
......@@ -30,7 +30,7 @@ echo "Starting $NAME as `whoami`"
# Activate the virtual environment
cd $PROJECTDIR
source ./bin/activate
source /home/exu/bbx/bbx-env/bin/activate
# Create the run and log directory if it doesn't exist
RUNDIR=$(dirname $SOCKFILE)
......@@ -40,7 +40,7 @@ test -d $PROJECTDIR/$LOGDIR || mkdir -p $LOGDIR
echo "Starting gunicorn"
# Start your Unicorn
# Programs meant to be run under supervisor should not daemonize themselves (do not use --daemon)
exec /home/exu/bbx/bin/gunicorn ${ASGI_MODULE}:api \
exec /home/exu/bbx/bbx-env/bin/gunicorn ${ASGI_MODULE}:api \
--worker-class $WORKER_CLASS \
--workers $NUM_WORKERS \
--timeout $TIMEOUT \
......
......@@ -13,3 +13,5 @@ pygments
anyio
filetype
opencv-contrib-python-headless
cv2
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment