chore: ruff --fix
This commit is contained in:
1 parent
39a3d05154
commit
1f02ed5eff
19 files changed
+382
-369
No files matched your search
Vendored
+16
-16
@@ -7,27 +7,27 @@ from invoke import task
|
||||
@task()
|
||||
def deploy(c):
|
||||
"""Make sure proxy_user is set to your neuf username."""
|
||||
project_path = '/var/www/neuf.no/kassa'
|
||||
proxy_user = os.getenv('DEPLOY_USER', os.getenv('USER'))
|
||||
project_path = "/var/www/neuf.no/kassa"
|
||||
proxy_user = os.getenv("DEPLOY_USER", os.getenv("USER"))
|
||||
|
||||
c = Connection(host='gitdeploy@dreamcast.neuf.no', gateway=Connection('login.neuf.no', user=proxy_user))
|
||||
c = Connection(host="gitdeploy@dreamcast.neuf.no", gateway=Connection("login.neuf.no", user=proxy_user))
|
||||
|
||||
with c.cd(project_path), c.prefix('source {}/venv/bin/activate'.format(project_path)):
|
||||
c.run('git pull') # Get source
|
||||
c.run('pip install -U pip')
|
||||
c.run('pip install -r requirements.txt') # install deps in virtualenv
|
||||
with c.cd('static'): # install and compile frontend deps
|
||||
c.run('npm i')
|
||||
c.run('npm run build')
|
||||
c.run('python manage.py collectstatic --noinput -i node_modules') # Collect static
|
||||
c.run('python manage.py migrate') # Run DB migrations
|
||||
with c.cd(project_path), c.prefix(f"source {project_path}/venv/bin/activate"):
|
||||
c.run("git pull") # Get source
|
||||
c.run("pip install -U pip")
|
||||
c.run("pip install -r requirements.txt") # install deps in virtualenv
|
||||
with c.cd("static"): # install and compile frontend deps
|
||||
c.run("npm i")
|
||||
c.run("npm run build")
|
||||
c.run("python manage.py collectstatic --noinput -i node_modules") # Collect static
|
||||
c.run("python manage.py migrate") # Run DB migrations
|
||||
|
||||
# Reload gunicorn
|
||||
c.sudo('/usr/bin/supervisorctl pid kassa.neuf.no | xargs kill -HUP', shell=False)
|
||||
c.sudo("/usr/bin/supervisorctl pid kassa.neuf.no | xargs kill -HUP", shell=False)
|
||||
|
||||
|
||||
@task
|
||||
def build(c):
|
||||
with c.cd('static'):
|
||||
c.run('npm i')
|
||||
c.run('npm run build')
|
||||
with c.cd("static"):
|
||||
c.run("npm i")
|
||||
c.run("npm run build")
|
||||
Reference in new issue
Block a user