Created
October 17, 2016 22:52
-
-
Save rafaelhenrique/2f2feb64825d695bb049d985e462e250 to your computer and use it in GitHub Desktop.
Resumo das aulas de Deploy https://www.youtube.com/watch?v=-XDWUBIccrw
This file contains hidden or 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
- Nginx -> Camada em cima da aplicação | |
para que nem todas as requisições sejam | |
servidas pela aplicação | |
APLICAÇÃO <----> NGINX <----> INTERNET | |
<----- USUÁRIO XPTO | |
-----> USUÁRIO XPTO | |
APLICAÇÃO <---- NGINX | |
-----> USUÁRIO XPTO | |
NGINX: REQUISIÇÃO DE ARQUIVOS ESTÁTICOS | |
-> .css | |
-> .html | |
-> imagem | |
-> .js | |
AMAZON S3 | |
APACHE | |
- Uwsgi / Gunicorn (Green Unicorn) | |
APLICAÇÃO <-----> UWSGI <----> NGINX <----> INTERNET | |
4 aplicações | |
- Coletar os estáticos | |
Pegar todos os estáticos do projeto e jogar em uma única | |
pasta de forma organizada. | |
- Servidor | |
- Local: Servidor local dentro da empresa | |
- Cloud: Digital ocean, Amazon, Openshift, Heroku | |
- Você usa: | |
- PaaS: Platform as a Service | |
- Você tem uma plataforma e hospeda seu | |
software lá dentro | |
- Você nunca vai se preocupar com o S.O., | |
ou com (processamento) hardware | |
- Ex: Heroku | |
- IaaS: Infrasctructure as a Service | |
- Ex: Amazon EC2, Digital Ocean | |
- Seu cliente usa: | |
- SaaS: Software as a Service | |
- Ex: Google drive, Gmail | |
- Supervisor | |
- Controla os processos relacionados a aplicação | |
- OBRIGATÓRIO -> S.O. ATUALIZADO!! | |
- Comando uwsgi | |
SECRET_KEY=blabla \ | |
SERVER_NAME=172.16.100.2:9090 \ | |
DATABASE_URI=sqlite:///tvseries.sqlite3 \ | |
uwsgi --master --http :9090 --workers=4 \ | |
--pythonpath=/home/application/project \ | |
--wsgi=tvseries:create_app\(\) | |
--enable-threads --single-interpreter \ | |
--stats uwsgistats.sock |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment