README.md 3.37 KB
Newer Older
1
# SRCTWeb -- the homepage of Mason SRCT
Daniel W Bond's avatar
Daniel W Bond committed
2

David Haynes's avatar
David Haynes committed
3
Our own little site on the world wide web.
Daniel W Bond's avatar
Daniel W Bond committed
4

David Haynes's avatar
David Haynes committed
5
A static site built with [Jekyll](https://jekyllrb.com/).
Daniel W Bond's avatar
Daniel W Bond committed
6

David Haynes's avatar
David Haynes committed
7
# Setup instructions for local development
Daniel W Bond's avatar
Daniel W Bond committed
8

David Haynes's avatar
David Haynes committed
9
## 1) Install `git` on your system
Daniel W Bond's avatar
Daniel W Bond committed
10

David Haynes's avatar
David Haynes committed
11
`git` is the version control system used for SRCT projects.
Daniel W Bond's avatar
Daniel W Bond committed
12

David Haynes's avatar
David Haynes committed
13
### On Linux Based Systems
Daniel W Bond's avatar
Daniel W Bond committed
14

David Haynes's avatar
David Haynes committed
15
**with apt:**
Daniel W Bond's avatar
Daniel W Bond committed
16

David Haynes's avatar
David Haynes committed
17
Open a terminal and run the following command:
Daniel W Bond's avatar
Daniel W Bond committed
18

David Haynes's avatar
David Haynes committed
19
    sudo apt update
David Haynes's avatar
David Haynes committed
20

David Haynes's avatar
David Haynes committed
21
This retrieves links to the most up-to-date and secure versions of your packages.
David Haynes's avatar
David Haynes committed
22

David Haynes's avatar
David Haynes committed
23
Next, with:
David Haynes's avatar
David Haynes committed
24

David Haynes's avatar
David Haynes committed
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
    sudo apt install git

you install `git` onto your system.

### On macOS

We recommend that you use the third party Homebrew package manager for macOS,
which allows you to install packages from your terminal just as easily as you
could on a Linux based system. You could use another package manager (or not
use one at all), but Homebrew is highly reccomended.

To get homebrew, run the following command in a terminal:

    /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)

**Note**: You do NOT need to use `sudo` when running any Homebrew commands, and
it likely won't work if you do.

Next, to make sure Homebrew is up to date, run:

    brew update

Finally we can install git with:

    brew install git

### On Windows

We recommend that if you are on Windows 10 AE (Anniversary Edition) or above to make use of the
Windows Subsystem for Linux (WSL). The following link should get you up and running:

[https://msdn.microsoft.com/en-us/commandline/wsl/install_guide](https://msdn.microsoft.com/en-us/commandline/wsl/install_guide)

#### Contributing with Windows

If you are not on Windows 10 or would rather prefer to not use the WSL you may download Git for
Windows here:

[https://git-scm.com/download/win](https://git-scm.com/download/win)

I have also successfully ran the project with Docker on Windows, though you need
access to Hyper-V which is only available on **"Professional"** versions of Windows.

## 2) Clone the srctweb codebase

Now, we're going to clone down a copy of the SRCTWeb codebase from [git.gmu.edu](https://git.gmu.edu/srct/srctweb),
David Haynes's avatar
David Haynes committed
71 72 73 74
the SRCT code respository with SSH.

**a)** Configure your ssh keys by following the directions at:

David Haynes's avatar
David Haynes committed
75
**[git.gmu.edu/help/ssh/README](https://git.gmu.edu/help/ssh/README)**
David Haynes's avatar
David Haynes committed
76 77 78 79

**b)** Now, on your computer, navigate to the directory in which you want to download the project (ie. perhaps one called `~/development/SRCT`), and run

    git clone git@git.gmu.edu:srct/srctweb.git
Daniel W Bond's avatar
Daniel W Bond committed
80

David Haynes's avatar
David Haynes committed
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
## 3) Get SRCTWeb up and running with the method of your choice

Now that we have cloned down the repo you can

    cd srctweb/

and get to working on setting up a development environment!

### Docker

Installing Docker on your system:

* For macOS go here: https://docs.docker.com/docker-for-mac/
* For Windows go here: https://docs.docker.com/docker-for-windows/
* For your specific linux disro go here: https://docs.docker.com/engine/installation/
  * Additionally, you will need to install docker-compose: https://docs.docker.com/compose/install/

Run:

    docker-compose up

If that doesn't work, try:

    sudo docker-compose up

You should see that the server is running by going to [http://localhost:4000](http://localhost:4000) in your browser. Any changes you make to your local file system will be mirrored in the server.

# Contrubuting

Please read `CONTRIBUTING.md` for specific information and best practices on how
to contribute to the project.