File tree Expand file tree Collapse file tree 2 files changed +28
-2
lines changed Expand file tree Collapse file tree 2 files changed +28
-2
lines changed Original file line number Diff line number Diff line change
1
+ FROM fedora:latest
2
+ MAINTAINER "Laurent Rineau" <
[email protected] >
3
+
4
+ RUN yum -y update
5
+ RUN yum -y install python-pip && yum clean all
6
+
7
+ ADD LICENSE requirements.txt webhooks.py config.json hooks /src/
8
+
9
+ RUN cd /src; pip install -r requirements.txt
10
+
11
+ EXPOSE 5000
12
+
13
+ WORKDIR /src
14
+ CMD ["python" , "/src/webhooks.py" ]
Original file line number Diff line number Diff line change @@ -94,8 +94,8 @@ executable and has a shebang. A simple example in Python could be:
94
94
f.write(json.dumps(payload))
95
95
96
96
97
- Deploy
98
- ======
97
+ Deploy in Apache
98
+ ==================
99
99
100
100
To deploy in Apache, just add a ``WSGIScriptAlias `` directive to your
101
101
VirtualHost file:
@@ -126,6 +126,18 @@ And add a Webhook to the WSGI script URL:
126
126
127
127
http://my.site.com/webhooks
128
128
129
+ Deploy in a Docker container
130
+ ============================
131
+
132
+ To deploy in a docker container, you have to expose the port 5000, for
133
+ example with the following command:
134
+ ::
135
+ docker run -d --name webhooks -p 5000:5000 lrineau/python-github-webhooks
136
+
137
+ You can also mount volume to setup the ``hooks/ `` directory, and the file
138
+ ``config.json ``:
139
+ ::
140
+ docker run -d --name webhooks -v /path/to/my/hooks:/src/hooks -v /path/to/my/config.json:/src/config.json -p 5000:5000 lrineau/python-github-webhooks
129
141
130
142
Debug
131
143
=====
You can’t perform that action at this time.
0 commit comments