Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Desenvolvendo aplicações web com Flask e Docker
Search
felipe
November 20, 2019
Technology
29
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Desenvolvendo aplicações web com Flask e Docker
felipe
November 20, 2019
Transcript
19 slides
Desenvolvendo aplicações web com Flask e Docker
Conteúdo ➔ O que é Docker e porque isso importa
➔ Estruturando a aplicação ➔ Build e Deploy ➔ Aplicação de exemplo* 1
O que é Docker | VMs vs Docker 2 Fonte:https://docs.docker.com/get-started/#containers-and-virtual-machines
O que é Docker | Arquitetura 3 Fonte: https://docs.docker.com/engine/docker-overview/#docker-architecture
O que é Docker | Imagens e Containers 4 11cd0b38bc34c
0B 582eca42208a3 64B 4c80de2f429bb 276MB 329b145c4ace1 0B h34kh33ld0dd2 9.28kB R/W Layer Container Layer Image Layers
Porque isso importa 5 Python Libs Code Python Libs Code
OS / Environment Virtualenv Docker
Estruturando a aplicação
12 factor app 1. Codebase 2. Dependencies 3. Config 4.
Backing Services 5. Build, release, run 6. Processes 6 7. Port Binding 8. Concurrency 9. Disposability 10. Dev/prod parity 11. Logs 12. Admin Processes
Isolamento de dependências 7
Utilizando logs 8
Bancos de dados como serviços de apoio 9
Build e Deploy
Criando um Dockerfile 10 11cd0b38bc34c 5MB 582eca42208a3 200kB 4c80de2f429bb 276MB
Criando uma imagem do Docker 11
Executando um container 12
Armazenando no Docker Hub 13
Dicas para produção ➔ Use load balancers e/ou proxies reversos
➔ Utilizar um orquestrador de containers (Kubernetes, Swarm, Mesos…) ➔ Seguir boas práticas na criação de imagens ➔ Criar volumes persistentes para os dados ➔ Criar imagens com responsabilidades pequenas 14
Onde encontrar mais ➔ Documentação oficial do Docker - https://docs.docker.com
➔ Creating Effective Docker Images - https://www.youtube.com/watch?v=vlS5EiapiII ➔ 12 factor app - https://12factor.net/ ➔ Miguel Grinberg’s blog - https://blog.miguelgrinberg.com/ ➔ awesome-docker https://github.com/veggiemonk/awesome-docker ➔ https://github.com/humiaozuzu/awesome-flask 15
Obrigado https://gitlab.com/felipemocruha/flask-conf-2018
[email protected]
More Decks by felipe
See All by felipe
Functional Programming with examples
felipemocruha
0
41
Aplicações Flask Resilientes com Envoy e Kubernetes
felipemocruha
0
43
Docker e Kubernetes
felipemocruha
0
58
Emacs
felipemocruha
0
24
Introdução a Python e seu Ecossistema
felipemocruha
0
24
Data Structures and Performance
felipemocruha
0
29
Observability
felipemocruha
0
40
Testes de Software
felipemocruha
0
27
Other Decks in Technology
See All in Technology
Kiro Enterprise Management: 管理者が 1 か所で決め、全員の Kiro に届ける
inariku
PRO
1
170
Ignite 2026 Security
babaneko
0
120
Webメール開発を大幅に変えたJMAPというゲームチェンジャー
tascript
9
6k
競馬予想をAIでやってみた話
yoshimura_datam
0
160
エンタープライズIAMについて - ID・権限をどう統制するか
oidfj
1
360
専門家に使ってもらうAIプロダクトをつくる - 病院の医事課向けDPCコーディング支援システムの設計と評価
hagino3000
4
1.1k
プラガブルで宣言的なソフトウェアファクトリーを支えるTypeScript
timakin
5
2.1k
AIフレンドリーなGenerative UIをJSXで
uhyo
2
1k
現地速報! Microsoft Ignite アップデートレポート
kasada
1
730
【Oracle AI SPOTLIGHT ウェビナー】AI時代、狙われるデータと止められない業務をどう守るか?
oracle4engineer
PRO
1
170
技術書典で本を売る流れ
yoshimura_datam
0
200
OCI Artifact による自動運転タクシーに向けた OTA 基盤の構築
biwashi
1
300
Featured
See All Featured
What the history of the web can teach us about the future of AI
inesmontani
PRO
3
840
Navigating Weather and Climate Data
rabernat
0
610
How to train your dragon (web standard)
notwaldorf
96
6.9k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
Faster Mobile Websites
deanohume
310
32k
Design in an AI World
tapps
1
400
Optimising Largest Contentful Paint
csswizardry
37
4k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
GraphQLとの向き合い方2022年版
quramy
50
15k
Unsuck your backbone
ammeep
672
58k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.5k
The Language of Interfaces
destraynor
163
27k