Wiki

Clone wiki

khk-independent / Deployment

You're at a stage where there's already something working. This is usually the time to set up a Staging site. You'll be uploading your code to the Internet for the world (instructors and your peers) to see.

  • Make sure you've commited all your previous changes.
  • Make/update a dump file of your database, using mysqldump command.
  • Add your change to git and commit it, all in one step: git commit -am "Added database dump"
  • Log in, using SSH, to dev.diara.ee. Ask for the username and password on the Skype channel.
  • Create a subfolder. Name it the same as your first name, lower case letters.
  • Go into that folder and clone your GitHub project repository into that folder.
  • Log in to MySQL's command line client, called mysql, on dev
    • Username is the same as SSH login
    • Password is the same, too, except instead of '4', use 'a'
  • In mysql client, create a database for your project.
    • The name of the database must be khk_yourname (where yourname is your first name, lowercase).
  • Exit the mysql client and update database.php to work with dev's MySQL server.
  • Import your database dump file to MySQL database on Dev, using the same text-based mysql client as before.
  • Test that your site appears at http://dev.diara.ee/khk/yourname/jolly and functions normally.
  • Fix any problems and test again until there are no more problems.

Troubleshooting

  • Q: I'm getting 'Could not scan for classes inside blah" error while running ./composer.phar install on server.
  • A: The quick fix is to delete composer.lock file and vendor/ directory and run ./composer.phar install again.

Note: Google 'how to...' when unsure how to perform the above steps.

Moving on

Next up: Employee view

Updated