0
我有兩個服務器,我需要部署到,但他們有一個稍微不同的設置。該應用程序被部署到每個服務器上的不同路徑(/var/www/sites/my_site
和/var/www/my_site
)。蟒蛇織物與動態remote_path
我的文件看起來有點像這樣:
env.roledefs = {
'production': ['host1.foo.bar', 'host2.foo.bar']
}
@task
@roles(['production'])
def deploy():
files = getBundlePaths()
for file in files:
# How would I go about uploading to a different path per server?
put(file, ...)