FAQ

MacOS - PHP development using docker (installation)

This walks through how to setup your programming rig, using Docker and PHP storm 







# 1 > Quick overview of all programs installed

HomeBrew
Great way to install packages on your computer to help with developement. 

PHPStorm
Great program to edit PHP files
Bash support: Install bash support
SVN / GIT comes from HomeBrew

Docker
Container program that allows you to run websites locally on your computer 

Zoom.us
Collaboration program, share screen, talk

Firefox (developer edition)
View your local SAAS and website on your local computer

Screenshots
Save screenshots to downloads to more easily share and don't overcrowd your desktop with images. 
- Mojave: CMD+Shift+5 (choose location)

iTerm
Desc: Command line program that you can open quickly to perform any tasks and close quickly again
Full-screen top (like quake): Pref, Profiles, Window (Style: Full-width top of screen, Transparency: 20%, Spaces: All spaces),
Hotkey: Keys (Hotkey show/hide all windows with a system wide: CMD+~)

Finder
Home folder: create icon to have your home folder on side bar (go - computer - macbookair - users - drag to side bar)
_WEBROOT: Create a webroot in home folder for easy access to files





# 2 > Checkout WEBSITE files

We store websites as SVN and software as GITHUB

SVN: Provides a very fast and easy method to checkout, work and commit. For websites we do not need a commit/push as this normally slows down development and does not give a benefit for websites. 
-> Ask our admins to add you to our SVN server which will give you access to all active projects. 
-> Add svn with homebrew -> brew install subversion
-> PHP enable interactive mode (settings, svn, interactive mode)
-> Add Repositories -> https://svn.undologic.com/updateCase.com
-> checkout to your _WEBROOT dir

GITHUB: For software, because it is more complicated coding it is important that we have a checkout commit (locally) and only PUSH when the code is validated and confirmed. 
-> Ask our admins to add you as a user to the project you want to work on in GitHub and then it will be in the list of options when you checkout





# 3 > Verify running

To verify that your docker is running

Open PHPStorm

Checkout a project

Open Terminal
-> Navigate to the docker folder
-> type ./3startDocker.sh
OR
-> Right click on that same file and choose 'Run...'

Open Firefox
-> type localhost
-> The site should load !

 





# 4 > Setup a brand new project (Greengrass)

To setup a brand new project using DOCKER / cakePHP on MacOS:

  • Open terminal and navigate to your website files directory
  • type this command to download the install file: 
    curl http://install.updatecase.com/install-cakePHP2 --output install-cakePHP2.sh
  • type this command to give priv:
    chmod +x install-cakePHP2.sh
  • type to run the install
    ./install-cakePHP2.sh
  • This will CREATE a new folder 'newProject' with docker / cakephp 2.x
  • You can now run docker (eg cd docker && ./3startDocker.sh)
  • You can now commit this new project to a version control (SVN OR GITHUB)




# 5 > PHPstorm

To use CakePHP CTP files in PHPstorm, we need to assign that 

*.ctp 

files are including php coding

PHPSTORM - Preferences - Editor - File Types - PHP - ADD (+) - Add: *.ctp