From 599dff7720eb3352b6280478169834d096fd9f72 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Thu, 7 May 2020 12:57:45 +0100 Subject: [PATCH] Add custom bin scripts --- .gitignore | 1 + bin/composer.sh | 3 +++ bin/drush.sh | 5 +++++ bin/refresh.sh | 5 +++++ bin/start.sh | 6 ++++++ bin/stop.sh | 6 ++++++ 6 files changed, 26 insertions(+) create mode 100755 bin/composer.sh create mode 100755 bin/drush.sh create mode 100755 bin/refresh.sh create mode 100755 bin/start.sh create mode 100755 bin/stop.sh diff --git a/.gitignore b/.gitignore index b06300b04..50b4488f3 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ !/.gitignore !/**/.gitkeep !/.idea/** +!/bin/* !/config/** !/phpstan.neon !/scripts/** diff --git a/bin/composer.sh b/bin/composer.sh new file mode 100755 index 000000000..1e48c3d75 --- /dev/null +++ b/bin/composer.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +symfony composer "$@" diff --git a/bin/drush.sh b/bin/drush.sh new file mode 100755 index 000000000..f83fd5093 --- /dev/null +++ b/bin/drush.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +cd web + +symfony php ../vendor/bin/drush "$@" diff --git a/bin/refresh.sh b/bin/refresh.sh new file mode 100755 index 000000000..76cf03c58 --- /dev/null +++ b/bin/refresh.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +./bin/drush.sh site:install -y \ + --existing-config \ + --account-pass=admin123 diff --git a/bin/start.sh b/bin/start.sh new file mode 100755 index 000000000..99059efd7 --- /dev/null +++ b/bin/start.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +set -e + +docker-compose up -d +symfony server:start -d diff --git a/bin/stop.sh b/bin/stop.sh new file mode 100755 index 000000000..bd99e2fb0 --- /dev/null +++ b/bin/stop.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +set -e + +symfony server:stop +docker-compose down