Add app.yml, remove fabfile.py
This commit is contained in:
parent
2d5594b9b2
commit
b5d6443acb
24
app.yml
Normal file
24
app.yml
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
api: '1'
|
||||||
|
type: sculpin
|
||||||
|
|
||||||
|
sculpin:
|
||||||
|
theme:
|
||||||
|
build:
|
||||||
|
bower: yes
|
||||||
|
npm: no
|
||||||
|
type: gulp
|
||||||
|
yarn: yes
|
||||||
|
path: ~
|
||||||
|
|
||||||
|
composer:
|
||||||
|
install: yes
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
restart_php: false
|
||||||
|
restart_webserver: true
|
||||||
|
rsync:
|
||||||
|
# local_dir:
|
||||||
|
# remote_dir:
|
||||||
|
options: '-vzcrSLh'
|
||||||
|
delete: true
|
||||||
|
type: rsync
|
32
fabfile.py
vendored
32
fabfile.py
vendored
|
@ -1,32 +0,0 @@
|
||||||
from fabric.api import *
|
|
||||||
from fabric.contrib.project import rsync_project
|
|
||||||
|
|
||||||
env.use_ssh_config = True
|
|
||||||
|
|
||||||
project_root = '/var/www/oliverdavies'
|
|
||||||
|
|
||||||
@task
|
|
||||||
def build_deploy():
|
|
||||||
build()
|
|
||||||
deploy()
|
|
||||||
file_permissions()
|
|
||||||
|
|
||||||
def build():
|
|
||||||
local('npm run init')
|
|
||||||
local('npm run production')
|
|
||||||
local('composer install --no-dev --optimize-autoloader')
|
|
||||||
local('composer run production')
|
|
||||||
local('echo %s > output_prod/version' % env.build_number)
|
|
||||||
|
|
||||||
def deploy():
|
|
||||||
rsync_project(
|
|
||||||
remote_dir='%s/web/' % project_root,
|
|
||||||
local_dir='output_prod/',
|
|
||||||
default_opts='-vzcrSLh',
|
|
||||||
delete=True
|
|
||||||
)
|
|
||||||
run('sudo service nginx configtest && sudo service nginx reload')
|
|
||||||
|
|
||||||
def file_permissions():
|
|
||||||
run('sudo chown -R %s:%s %s/web' % (env.user, env.group, project_root))
|
|
||||||
run('sudo chmod -R 750 %s/web' % project_root)
|
|
Loading…
Reference in a new issue