Skip to content

Commit

Permalink
[update] docker
Browse files Browse the repository at this point in the history
  • Loading branch information
jhao104 committed Sep 11, 2019
1 parent 90608d8 commit 5f89db3
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 4 deletions.
17 changes: 13 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
FROM python:3.6
ENV DEBIAN_FRONTEND noninteractive

MAINTAINER jhao104 <j_hao104@163.com>

ENV TZ Asia/Shanghai

WORKDIR /usr/src/app

COPY ./requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

RUN pip install --no-cache-dir -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple/

COPY . .

EXPOSE 5010
WORKDIR /usr/src/app/
CMD [ "python", "Run/main.py" ]

WORKDIR /usr/src/app/cli

ENTRYPOINT [ "sh", "start.sh" ]
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,15 @@ SERVER_API = {
>>>python proxyPool.py webserver


```

### Docker

```bash
docker pull jhao104/proxy_pool

docker run --env db_type=REDIS --env db_host=127.0.0.1 --env db_port=6379 --env db_password=pwd_str -p 5010:5010 jhao104/proxy_pool

```


Expand Down
3 changes: 3 additions & 0 deletions cli/start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash
python proxyPool.py webserver &
python proxyPool.py schedule

0 comments on commit 5f89db3

Please sign in to comment.