Replace Makefile with workspace
This commit is contained in:
parent
bb5572dfd5
commit
adb5cbd88d
3 changed files with 41 additions and 23 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -11,3 +11,4 @@
|
||||||
!/patches/
|
!/patches/
|
||||||
!/README.md
|
!/README.md
|
||||||
!/tools/
|
!/tools/
|
||||||
|
!/workspace.yml
|
||||||
|
|
|
||||||
23
Makefile
23
Makefile
|
|
@ -1,23 +0,0 @@
|
||||||
default: init
|
|
||||||
|
|
||||||
app-install: copy-required-files
|
|
||||||
docker-compose run --rm php vendor/bin/drush site:install -y \
|
|
||||||
--existing-config \
|
|
||||||
--site-name="Stream Demo" \
|
|
||||||
--account-pass=admin123
|
|
||||||
|
|
||||||
copy-required-files: vendor
|
|
||||||
cp .env.example .env
|
|
||||||
cp .docker.env.example .docker.env
|
|
||||||
|
|
||||||
init: copy-required-files start app-install
|
|
||||||
|
|
||||||
start: copy-required-files
|
|
||||||
docker-compose up -d
|
|
||||||
|
|
||||||
stop:
|
|
||||||
docker-compose down --remove-orphans
|
|
||||||
|
|
||||||
vendor: composer.json composer.lock
|
|
||||||
docker-compose run --rm composer validate
|
|
||||||
docker-compose run --rm composer install
|
|
||||||
40
workspace.yml
Normal file
40
workspace.yml
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
command('composer %'): |
|
||||||
|
#!bash|=
|
||||||
|
passthru "docker-compose run --rm composer ={ input.argument('%') }"
|
||||||
|
|
||||||
|
command('console'): |
|
||||||
|
#!bash
|
||||||
|
passthru "docker-compose run --rm php bash"
|
||||||
|
|
||||||
|
command('disable'): |
|
||||||
|
#!bash
|
||||||
|
run "docker-compose down --remove-orphans"
|
||||||
|
|
||||||
|
command('destroy'): |
|
||||||
|
#!bash
|
||||||
|
run "docker-compose down --remove-orphans -v"
|
||||||
|
|
||||||
|
command('drush %'):
|
||||||
|
env:
|
||||||
|
DRUSH_OPTIONS_URI: = @('app.url')
|
||||||
|
exec: |
|
||||||
|
#!bash|=
|
||||||
|
passthru "docker-compose run --rm -e DRUSH_OPTIONS_URI php vendor/bin/drush ={ input.argument('%') }"
|
||||||
|
|
||||||
|
command('enable'): |
|
||||||
|
#!bash
|
||||||
|
run "docker-compose up -d"
|
||||||
|
|
||||||
|
command('install'): |
|
||||||
|
#!bash|@
|
||||||
|
run "cp .docker.env.example .docker.env"
|
||||||
|
run "cp .env.example .env"
|
||||||
|
run "ws composer validate"
|
||||||
|
run "ws composer install"
|
||||||
|
run "ws drush site:install -y --existing-config --account-pass=@('admin.password')"
|
||||||
|
|
||||||
|
attributes:
|
||||||
|
admin:
|
||||||
|
password: secret
|
||||||
|
app:
|
||||||
|
url: http://stream-demo.docker.localhost
|
||||||
Reference in a new issue