Installing laravel vue.js on digitalocean ubuntu 20.04
I've built an app using laravel vue.js with components. Everything works locally.
I ran npm production and uploaded the app to bitbucket.
I created a server on digital ocean - ubuntu 20.04 - But it doesn't see vue.js??? Any help would be appreciated.
Here's my install process.. Basically, creating LAMP server.
apt-get update
sudo apt install php php-cli php-fpm php-json php-common php-mysql php-zip php-gd php-mbstring php-curl php-xml php-pear php-bcmath
sudo nano /var/www/html/test.php
Shows PHP Version 7.4.3 installed
sudo apt install mysql-server
curl -sS https://getcomposer.org/installer | php sudo mv composer.phar /usr/local/bin/composer sudo chmod +x /usr/local/bin/composer composer
sudo apt update sudo apt install phpmyadmin select apache2 Yes to Configure database enter password and confirm
sudo cp /etc/phpmyadmin/apache.conf /etc/apache2/conf-enabled/phpmyadmin.conf
sudo systemctl restart apache2
ServerIP/phpmyadmin - works.
mysql -u root -p
CREATE USER 'xxx'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON * . * TO 'jimmy'@'localhost';
FLUSH PRIVILEGES; exit
sudo apt update && sudo apt install unzip
cd /var/www/html
cloned the laravel app down
cd /var/www/html/app name composer update
cp .env.example .env
php artisan key:generate
nano .env
changed these items APP_NAME=appname APP_ENV=production APP_DEBUG=false APP_URL=http://DOMAIN_NAME_OR_IP_ADDRESS
DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=l7 DB_USERNAME=user DB_PASSWORD=password
created a database in phpmyadmin
php artisan migrate this worked
sudo chown -R www-data.www-data /var/www/html/name of app/storage sudo chown -R www-data.www-data /var/www/html/name of app/bootstrap/cache
cd /etc/apache2/sites-available
sudo nano nameofapp.conf
<VirtualHost *:80> ServerName thedomain.com ServerAdmin [email protected] DocumentRoot /var/www/html/nameofapp/public
<Directory /var/www/html/nameofapp> AllowOverride All ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined
sudo a2dissite 000-default.conf
sudo a2ensite 000-default.conf
sudo systemctl restart apache2
Try the Ipaddress in browser and laravel loads but the vue.js components don't run and vue.js is not detected on browser.
I ran npm production on the app before loading to server. I've run npm install and npm production on the server. Nothing is working...
What am I missing ??? Anyone ??? I have not found one article, that goes through the process of moving a laravel vue.js project to production on a server.
Please or to participate in this conversation.