Variables Used:
{{ENDPOINT}}
The endpoint used for project.
e.g. api.xyz.com
sudo LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/phpsudo apt-get updatesudo apt-get install apache2sudo apt-get install gzipsudo apt-get install php7.3sudo apt install zip unzip php7.3-zip
sudo apt-get install php7.3-curlsudo phpenmod curlsudo apt-get install php7.3-xmlrpcsudo phpenmod xmlrpcsudo apt-get install php7.3-mbstringsudo phpenmod mbstringsudo apt-get install php7.3-domsudo phpenmod domsudo apt-get install php7.3-gdsudo phpenmod gdsudo apt-get install php7.3-mysql
sudo nano /etc/php/7.3/apache2/php.ini
Set the following variables as required.
upload_max_filesize = 10M
post_max_size = 10M
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
sudo nano /etc/environment
Paste the following lines:
LC_ALL=en_US.UTF-8
LANG=en_US.UTF-8
sudo a2enmod rewritesudo service apache2 restart
sudo groupadd htmlownerssudo usermod -a -G htmlowners ubuntusudo usermod -a -G htmlowners www-data
cd /var/wwwsudo mkdir {{ENDPOINT}}
sudo chown -R ubuntu {{ENDPOINT}}
- Create Account
- Create Repository
- Copy your ssh key to beanstalk
- copy beanstalk's ssh key on clipboard
sudo nano ~/.ssh/authorized_keys- paste the copied ssh key from beanstalk here.
- Deploy code from beanstalk
cd /etc/apache2/sites-available/sudo nano {{ENDPOINT}}.confConfigure and saveSample File Heresudo a2ensite {{ENDPOINT}}.confsudo service apache2 restart
cd /var/www/{{ENDPOINT}}composer install
sudo chown -R ubuntu:htmlowners storagesudo chown -R ubuntu:htmlowners bootstrap/cachesudo chmod -R g+s storagesudo chmod -R g+s bootstrap/cachesudo chmod -R u+s storagesudo chmod -R u+s bootstrap/cachesudo find storage -type d -exec chmod 775 {} \;sudo find storage -type f -exec chmod 664 {} \;sudo find bootstrap/cache -type d -exec chmod 775 {} \;sudo find bootstrap/cache -type f -exec chmod 664 {} \;
sudo find {{ENDPOINT}} -type d -exec chmod 775 {} \;sudo find {{ENDPOINT}} -type f -exec chmod 664 {} \;