Flask Documentation (1.1.x)
Dispatching Implementing API Exceptions Using URL Processors Deploying with Setuptools Deploying with Fabric Using SQLite 3 with Flask SQLAlchemy in Flask Uploading Files Caching View Decorators Form Validation sourcing that activates a virtualenv and exports the development configuration for you. Use a tool like fabric [https://www.fabfile.org/] in production to push code and configurations separately to the production production server(s). For some details about how to do that, head over to the Deploying with Fabric pattern. Instance Folders Changelog Flask 0.8 introduces instance folders. Flask for a long time made it0 码力 | 428 页 | 895.98 KB | 1 年前3Python3 基础教程 - 廖雪峰
正确的部署方式是使用工具配合脚本完成自动化部署。Fabric 就是一个 自动化部署工具。由于 Fabric 是用 Python 2.x 开发的,所以,部署脚本 要用 Python 2.7 来编写,本机还必须安装 Python 2.7 版本。 要用 Fabric 部署,需要在本机(是开发机器,不是 Linux 服务器)安装 Fabric: $ easy_install fabric Linux 服务器上不需要安装 服务器上不需要安装 Fabric,Fabric 使用 SSH 直接登录服务器并 执行部署命令。 下一步是编写部署脚本。Fabric 的部署脚本叫 fabfile.py,我们把它放 到 awesome-python-webapp 的目录下,与 www 目录平级: awesome-python-webapp/ +- fabfile.py +- www/ +- ... Fabric 的脚本编写很简单,首先导入 的脚本编写很简单,首先导入 Fabric 的 API,设置部署时的变量: # fabfile.py import os, re from datetime import datetime # 导入 Fabric API: from fabric.api import * # 服务器登录用户名: env.user = 'michael' # sudo 用户为 root: env.sudo_user0 码力 | 531 页 | 5.15 MB | 1 年前3Flask Documentation (1.1.x)
Use a tool like fabric in production to push code and configurations separately to the production server(s). For some details about how to do that, head over to the Deploying with Fabric pattern. 1.11 automated deployment scenarios. If you want to fully automate the process, also read the Deploying with Fabric chapter. Basic Setup Script Because you have Flask installed, you have setuptools available on 122 Chapter 1. User’s Guide Flask Documentation (1.1.x), Release 1.1.4 1.21.7 Deploying with Fabric Fabric is a tool for Python similar to Makefiles but with the ability to execute commands on a remote0 码力 | 291 页 | 1.25 MB | 1 年前32_FPGA助力Python加速计算_陈志勇
Control Functional Safety Configuration & Security Unit Anti-Tamper & Trust Industry Standards Fabric Acceleration Customizable Engines High Speed Connectivity Video Codec 8K4K (15fps) 4K2K (60fps)0 码力 | 33 页 | 8.99 MB | 1 年前3FPGA助力Python加速计算 陈志勇
Control Functional Safety Configuration & Security Unit Anti-Tamper & Trust Industry Standards Fabric Acceleration Customizable Engines High Speed Connectivity Video Codec 8K4K (15fps) 4K2K (60fps)0 码力 | 34 页 | 4.19 MB | 1 年前3Django 1.8.x Documentation
but one option that many Django developers enjoy is Fabric. Below, and in the following sections, we’ll show off a few example fabfiles (i.e. Fabric scripts) that automate these file deployment options options. The syntax of a fabfile is fairly straightforward but won’t be covered here; consult Fabric’s documentation, for a complete explanation of the syntax. So, a fabfile to deploy static files to a couple like: 4.16. Deploying static files 589 Django Documentation, Release 1.8.20.dev20180306181007 from fabric.api import * # Hosts to deploy onto env.hosts = ['www1.example.com', 'www2.example.com'] # Where0 码力 | 1685 页 | 6.01 MB | 1 年前3Django 1.8.x Documentation
but one option that many Django developers enjoy is Fabric. Below, and in the following sections, we’ll show off a few example fabfiles (i.e. Fabric scripts) that automate these file deployment options covered here; consult Fabric’s documentation, for a complete explanation of the syntax. So, a fabfile to deploy static files to a couple of web servers might look something like: from fabric.api import * # bits of static files that have changed. Here’s how this might look in a fabfile: from fabric.api import * from fabric.contrib import project # Where the static files get collected locally. Your STATIC_ROOT0 码力 | 2454 页 | 2.85 MB | 1 年前3Django 1.11.x Documentation
but one option that many Django developers enjoy is Fabric. Below, and in the following sections, we’ll show off a few example fabfiles (i.e. Fabric scripts) that automate these file deployment options covered here; consult Fabric’s documentation, for a complete explanation of the syntax. So, a fabfile to deploy static files to a couple of web servers might look something like: from fabric.api import * # bits of static files that have changed. Here’s how this might look in a fabfile: from fabric.api import * from fabric.contrib import project # Where the static files get collected locally. Your STATIC_ROOT0 码力 | 1878 页 | 6.40 MB | 1 年前3Django 1.10.x Documentation
but one option that many Django developers enjoy is Fabric. Below, and in the following sections, we’ll show off a few example fabfiles (i.e. Fabric scripts) that automate these file deployment options covered here; consult Fabric’s documentation, for a complete explanation of the syntax. So, a fabfile to deploy static files to a couple of web servers might look something like: from fabric.api import * # bits of static files that have changed. Here’s how this might look in a fabfile: from fabric.api import * from fabric.contrib import project # Where the static files get collected locally. Your STATIC_ROOT0 码力 | 1817 页 | 6.19 MB | 1 年前3Django 1.11.x Documentation
but one option that many Django developers enjoy is Fabric. Below, and in the following sections, we’ll show off a few example fabfiles (i.e. Fabric scripts) that automate these file deployment options covered here; consult Fabric’s documentation, for a complete explanation of the syntax. So, a fabfile to deploy static files to a couple of web servers might look something like: from fabric.api import * # bits of static files that have changed. Here’s how this might look in a fabfile: from fabric.api import * from fabric.contrib import project # Where the static files get collected locally. Your STATIC_ROOT0 码力 | 2747 页 | 2.67 MB | 1 年前3
共 11 条
- 1
- 2