Created
June 24, 2021 19:14
-
-
Save fmtarif/11a3e773715bf76706941e75ceec2146 to your computer and use it in GitHub Desktop.
#cli #bash #server 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="example.com" | |
app_path="/opt/easyengine/sites/${domain}/app/htdocs" | |
gitrepo="https://github.com/laravel/laravel.git" | |
doc_root_realive_to_app_path="public" | |
#install easyengine if not already installed | |
#wget -qO ee https://rt.cx/ee4 && sudo bash ee | |
ee site create ${domain} --type=php --public-dir=${doc_root_realive_to_app_path} --php=7.3 | |
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