README.md 3.66 KB
Newer Older
David Haynes's avatar
David Haynes committed
1
# Go
Jean Michel Rouly's avatar
Jean Michel Rouly committed
2

David Haynes's avatar
David Haynes committed
3 4 5 6
[![build status](https://git.gmu.edu/srct/go/badges/master/build.svg)](https://git.gmu.edu/srct/go/commits/master)
[![coverage report](https://git.gmu.edu/srct/go/badges/master/coverage.svg)](https://git.gmu.edu/srct/go/commits/master)
![python version](https://img.shields.io/badge/python-2.7-blue.svg)
![Django version](https://img.shields.io/badge/Django-1.10-brightgreen.svg)
Jean Michel Rouly's avatar
Jean Michel Rouly committed
7

David Haynes's avatar
David Haynes committed
8
#### A project of [GMU SRCT](http://srct.gmu.edu).
9

David Haynes's avatar
David Haynes committed
10 11 12
Go is a drop-in URL shortening service. This project aims to provide an easy to use
URL branding service for institutions that wish to widely disseminate information
without unnecessarily outsourcing branding.
David Haynes's avatar
David Haynes committed
13

David Haynes's avatar
David Haynes committed
14 15
Go is currently a `Python 2.7` project written in the `Django` web framework, with
`MySQL` as our backend database.
16

David Haynes's avatar
David Haynes committed
17
# Setup instructions for local development
18

David Haynes's avatar
David Haynes committed
19 20 21 22
Go currently supports developers on Linux, macOS and Windows platforms through
both the Docker and Vagrant virtualization platforms. You may use either one
though we have included instructions for manual setup as well. Here's our walk-through
of steps we will take:
23

David Haynes's avatar
David Haynes committed
24 25 26
1. Install `git` on your system.
2. Clone the Go codebase.
3. Get Go up and running with the method of your choice.
Zosman's avatar
Zosman committed
27

David Haynes's avatar
David Haynes committed
28
## 1) Install `git` on your system.
Zosman's avatar
Zosman committed
29

David Haynes's avatar
David Haynes committed
30
`git` is the version control system used for SRCT projects.
Zosman's avatar
Zosman committed
31

David Haynes's avatar
David Haynes committed
32
### On Linux Based Systems
Zosman's avatar
Zosman committed
33

David Haynes's avatar
David Haynes committed
34
Open a terminal and run the following command:
mdsecurity's avatar
mdsecurity committed
35

David Haynes's avatar
David Haynes committed
36
    $ sudo apt-get update
Robert Hitt's avatar
Robert Hitt committed
37

David Haynes's avatar
David Haynes committed
38
This retrieves links to the most up-to-date and secure versions of your packages.
Robert Hitt's avatar
Robert Hitt committed
39

David Haynes's avatar
David Haynes committed
40
Next, with:
41

David Haynes's avatar
David Haynes committed
42
    $ sudo apt-get install git
David Haynes's avatar
David Haynes committed
43

David Haynes's avatar
David Haynes committed
44
you install `git` onto your system.
45

David Haynes's avatar
David Haynes committed
46
### On macOS
Zosman's avatar
Zosman committed
47

David Haynes's avatar
David Haynes committed
48 49 50 51
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.
52

David Haynes's avatar
David Haynes committed
53
To get homebrew, run the following command in a terminal:
David Haynes's avatar
David Haynes committed
54

David Haynes's avatar
David Haynes committed
55
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)
56

David Haynes's avatar
David Haynes committed
57 58
**Note**: You do NOT need to use `sudo` when running any Homebrew commands, and
it likely won't work if you do.
David Haynes's avatar
David Haynes committed
59

David Haynes's avatar
David Haynes committed
60
Next, to make sure Homebrew is up to date, run:
61

David Haynes's avatar
David Haynes committed
62
    $ brew update
Zosman's avatar
Zosman committed
63

David Haynes's avatar
David Haynes committed
64
Finally we can install git with `brew install git`
Zosman's avatar
Zosman committed
65

David Haynes's avatar
David Haynes committed
66
### On Windows
David Haynes's avatar
David Haynes committed
67 68 69
---

Instruction on how to setup git on Windows goes here.
Zosman's avatar
Zosman committed
70

David Haynes's avatar
David Haynes committed
71
## 2) Clone the Go codebase.
David Haynes's avatar
David Haynes committed
72

David Haynes's avatar
David Haynes committed
73 74
Now, we're going to clone down a copy of the Go codebase from [git.gmu.edu](http://git.gmu.edu/srct/go),
the SRCT code respository.
75

David Haynes's avatar
David Haynes committed
76
Configure your ssh keys by following the directions at [git.gmu.edu/help/ssh/README](http://git.gmu.edu/help/ssh/README).
David Haynes's avatar
David Haynes committed
77

David Haynes's avatar
David Haynes committed
78
Now, on your computer, navigate to the directory in which you want to download the project (perhaps one called development/ or something similar), and run
David Haynes's avatar
David Haynes committed
79

David Haynes's avatar
David Haynes committed
80
`$ git clone git@git.gmu.edu:srct/go.git`
David Haynes's avatar
David Haynes committed
81

David Haynes's avatar
David Haynes committed
82
## 3) Get Go up and running with the method of your choice.
83

David Haynes's avatar
David Haynes committed
84
### Docker
David Haynes's avatar
David Haynes committed
85

David Haynes's avatar
David Haynes committed
86
[docker configuration on the wiki](https://git.gmu.edu/srct/go/wikis/docker-configuration)
David Haynes's avatar
David Haynes committed
87

David Haynes's avatar
David Haynes committed
88
### Vagrant
David Haynes's avatar
David Haynes committed
89

David Haynes's avatar
David Haynes committed
90
[config](https://git.gmu.edu/srct/go/wikis/vagrant-configuration)
David Haynes's avatar
David Haynes committed
91

David Haynes's avatar
David Haynes committed
92
[usage](https://git.gmu.edu/srct/go/wikis/vagrant-usage)
David Haynes's avatar
David Haynes committed
93

David Haynes's avatar
David Haynes committed
94
### Manual Setup
David Haynes's avatar
David Haynes committed
95

David Haynes's avatar
David Haynes committed
96
# On Contributing
David Haynes's avatar
David Haynes committed
97 98


David Haynes's avatar
David Haynes committed
99 100
I encourage you to join the [#go channel](https://srct.slack.com/messages/go/details/) in SRCT's [Slack Group](https://srct.slack.com)
if you have any questions on setup or would like to contribute.
David Haynes's avatar
David Haynes committed
101 102


David Haynes's avatar
David Haynes committed
103
# Deployment
104 105 106 107 108 109

In order to expire links, you need to set up a cron job to run the manage.py
expirelinks command regularly. A sample cron script is available in the
repository and is named go-cleanlinks.cron. Drop this in cron.hourly and
change the paths so that they point to the virtualenv activate script and
manage.py.
David Haynes's avatar
David Haynes committed
110

David Haynes's avatar
David Haynes committed
111 112
---
**Note:**
David Haynes's avatar
David Haynes committed
113

114
Link by Viktor Vorobyev from the Noun Project.