Skip to Content
Flask Web开发:基于Python的Web应用开发实战(第2版)
book

Flask Web开发:基于Python的Web应用开发实战(第2版)

by Miguel Grinberg
August 2018
Intermediate to advanced
230 pages
6h 42m
Chinese
O'Reilly Media, Inc. Beijing
Content preview from Flask Web开发:基于Python的Web应用开发实战(第2版)
部署
195
在测试的过程中,还可以使用下述命令跟踪日志文件的内容:
$
heroku logs -t
17.4.4
 升级后重新部署
升级
Heroku
应用时要重复上述步骤。所有改动都提交到
Git
仓库之后,执行下述命令进行
升级:
$
heroku maintenance:on
$
git push heroku master
$
heroku run flask deploy
$
heroku restart
$
heroku maintenance:off
Heroku CLI
提供的 maintenance 命令在升级过程中下线应用,并向用户显示一个静态页面,
告知网站很快就能恢复。这样能避免用户在升级的过程访问应用。
17.5
 
Docker
容器
现在你已经熟悉
Heroku
的用法了,这是一种相当高层级的部署方式。本节介绍如何使用
容器
,具体而言是
Docker
平台。容器没有
PaaS
自动化程度高,但是更灵活,而且不限于
特定的云服务提供商。
容器是一种特殊的虚拟设备,运行在宿主操作系统的内核之上。与标准的虚拟设备不同,
容器没有虚拟化的内核和硬件。因为虚拟化在内核终止,所以容器比虚拟设备更轻量、更
高效,但是要求操作系统支持此项功能。
Linux
内核完全支持容器。
17.5.1
 安装
Docker
最流行的容器平台是
Docker
,它有免费社区版(
Docker CE
),也有订阅式企业版(
Docker
EE
)。
Docker
可在
3
大主流桌面操作系统中安装,也可以在云服务器中安装。若想开发并
测试容器化应用,最简单的方法是在开发系统中安装 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Python机器学习基础教程

Python机器学习基础教程

Andreas C. Müller, Sarah Guido
Python编程入门与实战

Python编程入门与实战

Posts & Telecom Press, Fabrizio Romano
程序设计导论:Python语言实践

程序设计导论:Python语言实践

罗伯特 塞奇威克, 凯文 韦恩, 罗伯特 唐德罗

Publisher Resources

ISBN: 9787115489456