Last active
April 12, 2022 18:42
-
-
Save fmtarif/a028540249053c8d0f1c22fed79d5f06 to your computer and use it in GitHub Desktop.
#bash take a php project git repo and deploy it in containers using easyengine (ee)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#take a php project git repo and deploy it in containers using easyengine (ee) | |
set -e | |
domain="test.host.com" | |
app_path="/opt/easyengine/sites/${domain}/app/htdocs" | |
gitrepo="https://repo_url" | |
doc_root_realive_to_app_path="repo/src/public" | |
wget -qO ee https://rt.cx/ee4 && sudo bash ee | |
# ee cli update --stable --yes | |
ee site create ${domain} --type=php --public-dir=${doc_root_realive_to_app_path} --php=7.2 | |
cd ${app_path} | |
git clone --depth 1 ${gitrepo} repo | |
chown -R www-data:www-data ${app_path} | |
cp .env.example .env | |
docker exec -it ${domain//./}_php_1 composer install --prefer-dist --no-scripts --no-dev -q -o | |
docker exec -it ${domain//./}_php_1 php artisan key:generate && php artisan migrate:fresh --seed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment