Starter Kit For Symfony Projects Setup Guide.
Things you will need before setting up.
- Amazon s3:
- secret
- key
- bucket name
- region
- Facebook Auth
- secret
- client id
- Google Auth
- secret
- client id
- You smtp server credentials
Setup Guide
- Install virtual box.
- Install vagrant.
- Read the homestead doc page
- Setup Homestead environment
- Now clone the repo for the starter kit
git clone https://github.com/phptuts/starterkitforsymfony.git
- Go into your Homestead.yml file and add a site to match where you cloned the repo. Mine looks like this.
folders: - map: ~/vagrant/code to: /home/vagrant/Code sites: - map: bigfootlocator.app to: /home/vagrant/Code/Symfony/SymfonyStart/web type: symfony2
- Also add a database to your config
databases: - homestead - skfsp
- vagrant up and then do a vagrant provision in the homestead folder.
- vagrant ssh to ssh into the vagrant box.
- cd into the directory where your project is
- create a jwt directory in your var folder
mkdir var/jwt
- create your private key with and write down the pass phrase you used.
openssl genrsa -out var/jwt/private.pem -aes256 4096
- create your public key, you will need the pass phrase here and in the composer install step
openssl rsa -pubout -in var/jwt/private.pem -out var/jwt/public.pem
- Run composer install
- Composer will ask for all the stuff you setup in the pre steps + jwt pass phrase & database info. Homestead root
password stuff is below. You can always change this in the parameters.yml, fyi.
here:
app.database_user: homestead app.database_password: secret app.database_name: skfsp ## or whatever you named it in the config
-
run migrations and this data fixtures script to load a default user.
bin/console doctrine:migrations:migrate bin/console doctrine:fixtures:load --fixtures="./src/AppBundle/DataFixtures/ORM/LoadStartUserData.php"
- Delete the .git folder
rm -rf .git
You should then have the website setup. The user to login is:
email: admin@not-real-domain.com / password: password
Then your done if you have any questions just ask!!! :)
Running Tests
This will run all the tests
sh scripts/run_tests.sh