forked from jpf/requestbin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Had to update gevent because of an ssl error with the previous version that caused issues when running in Docker.
- Loading branch information
Showing
4 changed files
with
58 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
FROM python:2.7-alpine | ||
|
||
RUN apk update && apk upgrade && \ | ||
apk add \ | ||
gcc python python-dev py2-pip \ | ||
# greenlet | ||
musl-dev \ | ||
# sys/queue.h | ||
bsd-compat-headers \ | ||
# event.h | ||
libevent-dev \ | ||
&& rm -rf /var/cache/apk/* | ||
|
||
# want all dependencies first so that if it's just a code change, don't have to | ||
# rebuild as much of the container | ||
ADD requirements.txt /opt/requestbin/ | ||
RUN pip install -r /opt/requestbin/requirements.txt \ | ||
&& rm -rf ~/.pip/cache | ||
|
||
# the code | ||
ADD requestbin /opt/requestbin/requestbin/ | ||
|
||
EXPOSE 8000 | ||
|
||
WORKDIR /opt/requestbin | ||
CMD gunicorn -b 0.0.0.0:8000 --worker-class gevent --workers 2 --max-requests 1000 requestbin:app | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,6 +35,23 @@ Now just deploy via git: | |
It will push to Heroku and give you a URL that your own private RequestBin will be running. | ||
|
||
|
||
## Deploy your own instance using Docker | ||
|
||
On the server/machine you want to host this, you'll first need a machine with | ||
docker and docker-compose installed, then grab the RequestBin source using git: | ||
|
||
`$ git clone git://github.com/Runscope/requestbin.git` | ||
|
||
Go into the project directory and then build and start the containers | ||
|
||
``` | ||
$ sudo docker-compose build | ||
$ sudo docker-compose up -d | ||
``` | ||
|
||
Your own private RequestBin will be running on this server. | ||
|
||
|
||
Contributors | ||
------------ | ||
* Barry Carlyon <[email protected]> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
app: | ||
build: . | ||
environment: | ||
REALM: prod | ||
REDIS_URL: "//redis:6379" | ||
links: | ||
- redis | ||
ports: | ||
- "8000:8000" | ||
|
||
redis: | ||
image: redis |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
gevent==0.13.8 | ||
gevent==1.0.2 | ||
greenlet==0.4.1 | ||
ProxyTypes==0.9 | ||
nose==1.3.0 | ||
|