This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mongodump -h ip:port -d db -u user -p pass -o . | |
mongorestore -h ip -d db -u user -p pass jifcast/ | |
query to csv: | |
mongoexport -h localhost -d jifcast -u jifcast -p jifcast -c episodes --type=csv --fields | |
name,_id,channel,downloadCount,likeCount,listenCount -q '{"likeCount": {"$exists": true }}' --out count.csv | |
create root user: | |
db.createUser( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
---------------- Django Nginx + gunicorn ---------------- | |
Primeiro rode o gunicorn no repositorio do projeto: | |
$ gunicorn --bind 0.0.0.0:8000 my_academic.wsgi & | |
Depois crie a seguinte configuração no Nginx (/etc/nginx/sites-available): | |
server { | |
access_log /home/user/code_back/logs/access.log; | |
error_log /home/user/code_back/logs/error.log; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-----------------------Debian Requirements------------------------ | |
python3-dev, apache2, libapache2-mod-wsgi-py3 | |
-------------------------------WSGI------------------------------- | |
import os | |
import time | |
import traceback | |
import signal | |
import sys | |