Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
NPDD
baobaxia-mucua
Commits
3df43d4d
Commit
3df43d4d
authored
3 years ago
by
Alice Bonafé
Browse files
Options
Download
Plain Diff
Merge branch 'master' of
https://labmocambos.taina.net.br/npdd/baobaxia-mucua
parents
9a76a6b8
9eb5c9a9
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
baobaxia/acervo.py
+1
-1
baobaxia/acervo.py
conf/bbx-nginx
+44
-0
conf/bbx-nginx
gunicorn.sh
+3
-3
gunicorn.sh
requirements/common.txt
+2
-0
requirements/common.txt
with
50 additions
and
4 deletions
+50
-4
baobaxia/acervo.py
View file @
3df43d4d
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
conf/bbx-nginx
0 → 100644
View file @
3df43d4d
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;
}
}
This diff is collapsed.
Click to expand it.
gunicorn.sh
View file @
3df43d4d
#!/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
\
...
...
This diff is collapsed.
Click to expand it.
requirements/common.txt
View file @
3df43d4d
...
...
@@ -13,3 +13,5 @@ pygments
anyio
filetype
opencv-contrib-python-headless
cv2
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help