README.md 3.09 KB
Newer Older
Brian Dukes's avatar
Brian Dukes committed
1
2
# README #

3
This is a tool for local development. This will allow you to sync projects from gitlab locally with ease.
Brian Dukes's avatar
Brian Dukes committed
4
5
6

### What is this repository for? ###

7
* Magento/Basesite/Wordpress
Brian Dukes's avatar
Brian Dukes committed
8
9
10

### How do I get set up? ###

Brian Dukes's avatar
Brian Dukes committed
11
12
13
14
15
16
17
18
19
20
21
1. Create a folder on your computer to serve as the server root, this will host a Magento, Basesite and Wordpress folder for those sites.   
    * Make a note of the server root location as that will be needed for the script.  
    * It should look something like this /mnt/c/path/to/folder /mnt lets you access drives on your computer, /mnt/c being the c drive /mnt/d being the d drive so use that to set the path.  
  
2. Start Menu-> Search for "Developer" and click on the Developer settings. Enable Developer Mode on the computer  
3. Start Menu-> Search for "Features" and click on the turn windows features on or off. check the Windows subsystem for linux option and click ok  
4. Restart Computer  
5. Start Menu-> Search for "Bash" and click on it and follow instructions for install  
	* Make note of your unix username and password as they will need to used later in the setup script  
6. when install is done type exit  
7. Start Menu-> Search for "Bash" and right click on it then Run as Administrator to open up the terminal  
22
8. `vim setup.sh` to create the file then copy paste contents from setup.sh file included. update setup.sh  
Brian Dukes's avatar
Brian Dukes committed
23
24
25
26
27
28
	* Line 2: set your unix username from step 5  
	* Line 3: set your unix password from step 5  
	* Line 4: set your email to generate ssh key (should be gitlab email)  
	* Line 5: set your computer name (this comes after the @ in the terminal, for instance mine shows bdukes@DESKTOP-U526Q6KQ so my computer name is DESKTOP-U526Q6KQ)  
	* Line 6: set your server root folder from step 1  

29
9. run `sudo sh setup.sh` and wait for the magic to hopefully happen  
Brian Dukes's avatar
Brian Dukes committed
30
   * While doing this you will have to answer some prompts, answer so that it lets it do what it wants to do when it asks. Also set root mysql password to "root".  
Brian Dukes's avatar
Brian Dukes committed
31
10. copy ssh key output and paste it into into gitlab ssh keys so composer works 
Brian Dukes's avatar
Brian Dukes committed
32
33
11. type exit and close out of bash  
12. Start Menu-> "Bash" Right click on file and click on "Open file Location". right click on the file in the folder and click on properties.  
34
    * Under Shortcut Tab -> Target enter `C:\Windows\System32\bash.exe -c ~/autostart.sh ~`  
Brian Dukes's avatar
Brian Dukes committed
35
36
    * Under Shortcut Tab -> click on Advanced button and check the box for run as administrator  
    * This will make the bash file on your computer auto start apache/mysql when you open it and force it to open as administrator (so you dont have to right click on it each time)
37
38
39

### Common Problems ###

Brian Dukes's avatar
Brian Dukes committed
40
41
Having issues getting composer to work. If it doesnt install then you will need to manually install composer. 

42
`curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer`
Brian Dukes's avatar
Brian Dukes committed
43
44
45

*Sometimes you have to run that command multiple times for it to work. Run it until you see Composer Successfully Installed

46
Then go into the ops dir and run `composer update` (again may have to run it a few times for it to work).
47

Brian Dukes's avatar
Brian Dukes committed
48
49
50

### Who do I talk to? ###

51
* Brian Dukes <briand@d3corp.com>