Skip to content
This repository was archived by the owner on Sep 22, 2020. It is now read-only.

Commit 64c35e9

Browse files
first draft of heroku support
1 parent 834d61e commit 64c35e9

5 files changed

Lines changed: 53 additions & 1 deletion

File tree

Procfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
web: cs-gh-proxy -e wsgi -p 8881 --authType allGitHubUsers --owner comsysto --repository github-pages-basic-auth-proxy --obfuscator 086e41eb6ff7a50ad33ad742dbaa2e70b75740c4950fd5bbbdc71981e6fe88e3

README.md

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,42 @@ Basic Auth checks against GitHub API. This little piece of software is brought t
5454
* If you create a directory in your `gh-pages` branch which is called e.g. `086e41eb6ff7a50ad33ad742dbaa2e70b75740c4950fd5bbbdc71981e6fe88e3` and proxy to this dir, it will be secure as long as no one knows **obfuscator** (you should keep it secret).
5555
* You proxy to https (TLS) so no man in the middle attack could get a hold of the obfuscator.
5656

57-
## 2. Installation
57+
## 2. Installation on Heroku
58+
59+
60+
Create a heroku app and clone the git repo. ([Toolbelt is installed](https://toolbelt.heroku.com/) and you are logged in)
61+
62+
```
63+
$> cd ~/
64+
$> heroku create
65+
# Creating app... done, stack is cedar-14
66+
# https://protected-foo-21086.herokuapp.com/ | https://git.heroku.com/protected-foo-21086.git
67+
$> git clone https://git.heroku.com/protected-foo-21086.git heroku-gh-proxy
68+
```
69+
70+
You now have a folder `heroku-gh-proxy` in your homedir that contains the deployed app (currently empty).
71+
Next we clone the GitHub Pages Proxy and extract the latest snapshot into `heroku-gh-proxy` (absolute path needed)
72+
73+
```
74+
$> cd ~/
75+
$> git clone https://github.com/comsysto/github-pages-basic-auth-proxy.git
76+
$> cd github-pages-basic-auth-proxy
77+
$> git checkout-index -a -f --prefix=/Users/bg/heroku-gh-proxy/ # absolute path with trailing slash!
78+
```
79+
80+
Now change the `Procfile` to your repository and obfuscator settings and push.
81+
82+
```
83+
$> cd ~/heroku-gh-proxy
84+
git add . -A
85+
git commit -m "init"
86+
git push
87+
```
88+
89+
Now your app should be up and running.
90+
91+
92+
## 2. Installation (Manual)
5893

5994
We will do demo setup for the following scenario:
6095

app.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"name": "GitHub Pages Auth Basic Proxy",
3+
"description": "GitHub Pages Auth Basic Proxy - Example Setup for Heroku",
4+
"image": "heroku/python",
5+
"repository": "https://github.com/comsysto/github-pages-basic-auth-proxy",
6+
"keywords": ["python", "gh-pages" ],
7+
"addons": [ ]
8+
}

requirements.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
requests==2.9.1
2+
argparse==1.4.0
3+
validators==0.10
4+
colorama==0.3.7
5+
bottle==0.12.9
6+
simplejson==3.8.2
7+
python-jose==0.6.1

runtime.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
python-3.5.0

0 commit comments

Comments
 (0)