FAQ

Install Docker to view your websites on your local computer







# 1 > Download & Install

Download and install Docker

Navigate to: https://www.docker.com/community-edition#/download

and install docker on your computer





# 2 > Start Docker
-> Ensure you do NOT have mamp running (the ports will interfere)
-> Right click on ‘3startDocker.sh’  -> click 'Run 3startDocker.sh'  to start docker
-> Right click on 4stopDocker.sh -> click Run 4stopDocker.sh to stop docker
-> 3rEsTartDocker.sh - will restart
 




# 3 > ready to run localhost

-> Ensure Process finished with exit code 0 (Should not be 1)
-> now you can view the project at ’http://localhost'

-> If you want to view the Mysql Database 'http://localhost:8081
user: root
pass: undologic





# 4 > DB export

WARNING: After you modify the database while you are running docker
-> if you STOP the docker container all the data will be LOST

In order to keep the database STATE
-> WHILE docker is running
-> right click on ./6saveCurrentDbState.sh and run 6saveCurrentDbState.sh
-> This will SAVE the current db from the docker container into the 'sql' directory
-> NOTE: You must delete the OLD sql file OR when you restart the docker it will not start. Simply delete the old sql that you do not need (if you see 'import.sql' do not delete)
-> 





# 5 > INSTALL: Open Project in Phpstom

Open the project that does NOT have the docker yet





# 6 > INSTALL: Open terminal and export Docker

-> Open the terminal built into phpstorm

We store our template in GitHub
-> However do not clone this directory, simply download from the github website OR svn export

svn export https://github.com/undoLogic/updateCase-docker-php5/trunk/docker/. docker/.

NEXT:

Small websites it will be added via SVN commit into a new repo
Software will be added to a new GITHUB repo





# 7 > INSTALL: Add to SVN/GIT

->Right Click Docker -> Select Subversion ->Click Add to VCS





# 8 > INSTALL: DB section

If you want to import a database, open the ’docker-compose.yml'  file and uncomment the DB section
If you want to import SQL file place it into 'sql' folder





# 9 > TROUBLESHOOTING

-> Right click 5stopAllDockers.sh -> click 'Run5stopAllDockers.sh' (to stop all docker running containers)