Skip to content

Commit ea3a867

Browse files
Update clone-from-git.md
1 parent 6cd403d commit ea3a867

File tree

1 file changed

+33
-22
lines changed

1 file changed

+33
-22
lines changed
Lines changed: 33 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,33 @@
11
# Clone Laddr from git
2+
23
This guide is for developers who want to work on Laddr's core code. It will walk you through
34
setting up a fresh site instance and cloning a version of Laddr into it from a remote git
45
repository.
56

67
## Step 1: Obtain an emergence host
8+
79
You will need a host server dedicated to running emergence. If you don't have access to one already,
8-
the easiest way to get started is to spin up a small **Ubuntu 14.04 LTS** virtual machine with a cloud
10+
the easiest way to get started is to spin up a small **Ubuntu 16.04 LTS** virtual machine with a cloud
911
provider like Digital Ocean, Google Cloud Compute, AWS, or countless others. Once you are logged in
10-
to your fresh Ubuntu 14.04 machine, follow [emergence's installation guide][emergence-install]
12+
to your fresh Ubuntu 16.04 machine, follow [emergence's installation guide][emergence-install]
1113
to prepare it for hosting emergence-powered sites like Laddr.
1214

13-
## Step 2: Create a site
15+
Alternatively, if you're familiar with Docker, you can spin up an emergence container:
16+
17+
```bash
18+
docker run -d \
19+
-it \
20+
--name emergence \
21+
-v /emergence:/emergence \
22+
-p 127.0.0.10:80:80 \
23+
-p 127.0.0.10:3306:3306 \
24+
-p 127.0.0.10:9083:9083 \
25+
jarvus/emergence \
26+
tmux new -s emergence emergence-kernel
27+
```
28+
29+
## Step 2: Create a site for your laddr development instance
30+
1431
Laddr is based on emergence's `skeleton-v2` site template. Unlike when provising a *deployment*
1532
instance of Laddr, for development you want to create a site extending Laddr's parent
1633
site like Laddr does rather than Laddr itself. Laddr's code will be cloned from git and applied
@@ -20,30 +37,24 @@ Use emergence's host control panel to create a new site with your desired hostna
2037
be sure to select `skeleton-v2.emr.ge` as the parent hostname. After the site is created login to <kbd>/develop</kbd>
2138
with your initial user developer account.
2239

23-
## Step 3: Configure git link
24-
To configure a link between your emergence instance and a git repository, create a file called
25-
<kbd>Git.config.php</kbd> in the top level of the `php-config` directory and copy its initial contents
26-
from the [latest version of Laddr's development Git.config.php][Git.config.php]
40+
## Step 3: Configure mapping to the laddr git repository
41+
42+
To configure a link between your emergence instance and a git repository, create a new file at `php-config/Git.config.d/laddr.php` and copy its initial contents
43+
from the [the file at the same path in Laddr's develop branch][git-config]
2744
on Github.
2845

29-
You may change `originBranch` to select a different source and change `workingBranch` to change which branch you'll
30-
be initially setup to commit to (both can be set to the same thing.)
46+
Optionally, edit the `remote` option to point at your own fork, and switch it to the SSH protocol if you'd like to be able to push changes from the web UI.
3147

32-
See the [emergence manual page on git integration][emergence-git] for full details on all the configuration
33-
options.
48+
## Step 4: Initialize git repository
3449

35-
## Step 4: Initialize git links
36-
Visit <kbd>/git/status</kbd> to view initialize the link with the configured git repository. If you are
37-
cloning via HTTPS or don't need to push changes back to origin from the web interfaces, you can leave the deploy key field
38-
empty and skip setting one up. Without a deploy key you will need to SSH into the server and use the git CLI to push changes.
39-
[Setting up a deploy key][emergence-git] will enable you to use emergence's (currently minimal) web interface
40-
for commiting/pushing changes.
50+
Visit <kbd>/site-admin/sources</kbd> to view initialize the configured git repository. If you are
51+
cloning via HTTPS you will need to SSH into the server and use the git CLI to push changes. If you switch the remote to an SSH git URL before initializing, a deploy key will be generated for you that you can install on GitHub before continueing to enable web-based read/write access.
4152

4253
## Step 5: Pull code from git
43-
Visit <kbd>/git/status</kbd> and click **Pull** if needed to pull the latest commits from github into your
44-
git working copy. Then click the **Disk -> VFS** button to import the git working tree copy into your
54+
55+
Visit <kbd>/site-admin/sources/laddr</kbd> and click **Pull** if needed to pull the latest commits from github into your
56+
git working copy. Then click the **Sync** -> **Update emergence VFS** button to import the git working tree copy into your
4557
emergence instance.
4658

47-
[emergence-install]: http://emr.ge/docs/setup/ubuntu/14.04
48-
[emergence-git]: http://emr.ge/docs/git/init
49-
[Git.config.php]: https://github.com/CfABrigadePhiladelphia/laddr/blob/development/php-config/Git.config.php
59+
[emergence-install]: https://emergenceplatform.gitbook.io/emergence-book/server-setup/installation/ubuntu-16.04
60+
[git-config]: https://github.com/CodeForPhilly/laddr/blob/develop/php-config/Git.config.d/laddr.php

0 commit comments

Comments
 (0)