Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Desenvolvendo aplicações web com Flask e Docker
Search
felipe
November 20, 2019
Technology
0
13
Desenvolvendo aplicações web com Flask e Docker
felipe
November 20, 2019
Tweet
Share
More Decks by felipe
See All by felipe
Functional Programming with examples
felipemocruha
0
23
Aplicações Flask Resilientes com Envoy e Kubernetes
felipemocruha
0
24
Docker e Kubernetes
felipemocruha
0
27
Emacs
felipemocruha
0
16
Introdução a Python e seu Ecossistema
felipemocruha
0
10
Data Structures and Performance
felipemocruha
0
18
Observability
felipemocruha
0
27
Testes de Software
felipemocruha
0
9
Other Decks in Technology
See All in Technology
複雑な構成要素を持つUIとの向き合い方 〜新・支出グラフでの実例〜 / B43 TECH TALK
nakamuuu
0
140
APIファーストなプロダクトマネジメントの実践 〜SaaSus Platformでの例〜 / "Practicing API-First Product Management - An Example with SaaSus Platform
oztick139
0
110
Python と Snowflake はズッ友だょ!~ Snowflake の Python 関連機能をふりかえる ~
__allllllllez__
1
130
require(ESM)とECMAScript仕様
uhyo
4
850
On Your Data を超えていく!
hirotomotaguchi
2
710
ゼロから始めるVue.jsコミュニティ貢献 / first-vuejs-community-contribution-link-and-motivation
lmi
1
130
Android Target SDK 35 (Android 15) 対応の概要
akkie76
0
120
非同期推論システムによるコスト削減と信頼性向上
koki_nishihara
0
280
「スニダン」開発組織の構造に込めた意図 ~組織作りはパッションや政治ではない!~
rinchsan
4
580
アクセシビリティを考慮したUI/CSSフレームワーク・ライブラリ選定
yajihum
2
1k
プラットフォームってつくることより計測することが重要なんじゃないかという話 / Platform Engineering Meetup #8
taishin
1
380
Gitlab本から学んだこと - そーだいなるプレイバック / gitlab-book
soudai
5
520
Featured
See All Featured
Build your cross-platform service in a week with App Engine
jlugia
225
17k
Building a Modern Day E-commerce SEO Strategy
aleyda
17
6.4k
A designer walks into a library…
pauljervisheath
200
23k
Building Your Own Lightsaber
phodgson
99
5.7k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
30
6k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
18
6.9k
Art, The Web, and Tiny UX
lynnandtonic
289
19k
jQuery: Nuts, Bolts and Bling
dougneiner
59
7.1k
Navigating Team Friction
lara
178
13k
Reflections from 52 weeks, 52 projects
jeffersonlam
345
19k
Product Roadmaps are Hard
iamctodd
44
9.7k
Building Better People: How to give real-time feedback that sticks.
wjessup
355
18k
Transcript
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]