Add download db from prod task

This commit is contained in:
Gabriel Augendre 2021-12-27 11:47:36 +01:00
parent c1515c6cf7
commit bb3083b9d5

View file

@ -37,3 +37,13 @@ def publish(ctx):
@task @task
def deploy(ctx): def deploy(ctx):
ctx.run("ssh ubuntu /home/gaugendre/blog/update", pty=True, echo=True) ctx.run("ssh ubuntu /home/gaugendre/blog/update", pty=True, echo=True)
@task
def download_db(ctx):
with ctx.cd(BASE_DIR):
ctx.run(
"scp ubuntu:/home/gaugendre/blog/db/db.sqlite3 ./db/db.sqlite3",
echo=True,
pty=True,
)