-
Notifications
You must be signed in to change notification settings - Fork 0
Adding a New Application
FrankSiderio edited this page Apr 10, 2018
·
6 revisions
Prerequisites:
- How to
ssh
onto the server. Checkout Server Guide - On the server we have: Composer, MySQL, Apache2, PHP7 installed
First, ssh
on our server in the data/sga_webapps/htdocs
folder. Here. we. go.
-
git clone
the repository of the application you want to add -
ls
to make sure the application folder was added -
cd
into that folder so if it wassga-website
you'll runcd sga-website
- Run a
composer update
now I can guarantee you'll get a permissions error for thecomposer.lock
file. To get rid of this runsudo chmod 777 composer.lock
and run acomposer update
again - Depending on your db setup (I hope you used migrations) you can run
php artisan migrate
to create all the tables (make sure your database is created first). Checkout Database guide if you don't know what the hell our database is - If you're a Laravel God (like Frank Siderio) you also have seeders so run
php artisan db:seed
- Okay if you've made it this far congrats!
- Create the
.env
file by runningsudo vi .env
- Copy the contents from
.env.example
and change the database username and password to our db username and password (see CommonKey) - Run
php artisan key:generate
- Run
sudo vi /etc/apache2/vhosts.d/lxsga.conf
this is the apache configuration file - You'll need to add this:
Alias /test /data/sga_webapps/htdocs/sga-website/public
<Directory "/data/sga_webapps/htdocs/sga-website/public">
Options Includes FollowSymlinks Multiviews AllowOverride All
Order allow,deny
Allow from all
</Directory>
What this is saying is when you visit /test
it will run the index file in /data/sga_webapps/htdocs/sga-website/public
For any Laravel application you'll need to set the path in the /public
folder because the index.php
file is in that directory.
- In this example navigate to
/test
and see if you get errors (you probably will) - You will have to give permissions to the
/storage
and/bootstrap
folders
sudo chmod 777 -R /storage
and same for/boostrap
- This will add these files to git so just check them out we do not want to commit them
Its good to run php artisan serve
to see if you get an errors through that. Most of the errors you'll get you can Google and find on Laracasts or StackOverflow.
- Home
- CIO
- Words of Wisdom
- Developers
- Designers
- Web Applications
- Making Changes
- Infrastructure
- Resources
- Key Contacts
- Future Plans