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版)
部署
205
如果你想持续监控日志流的话,使用下述命令:
$
docker-compose logs -f
docker-compose ps 命令输出运行中各容器的概况和状态:
$
docker-compose ps
Name Command State Ports
------------------------------------------------------------------------
flasky_flasky_1 ./boot.sh Up 0.0.0.0:8000->5000/tcp
flasky_mysql_1 /entrypoint.sh mysqld Up 3306/tcp, 33060/tcp
升级应用时,先做好修改,然后再次执行前面用于启动容器的
docker-compose up
命令即
可。只要有变化,
Compose
就会重新构建应用容器,把旧容器替换掉。
若想停止应用,使用 docker-compose down 命令。如果想把容器停止并删掉,使用 docker-
compose rm --stop --force 命令。
17.5.8
 清理旧容器和映像
使用容器的时间一长,系统中难免会堆积一些不再需要的旧容器或映像。最好定期检查并
清理,以免占用系统空间。
若想查看系统中有哪些容器,使用下述命令:
$
docker ps -a
这个命令将列出运行中的容器,以及停止了但仍在系统中的容器。若想删除列表中的某个
容器,使用 docker rm -f 命令,并指定容器的名称或 ...
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