diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..3b7c024 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,23 @@ +FROM python:3.7.6-alpine + +RUN adduser -D wikiapi +WORKDIR /home/wikiapi +RUN apk add openssh + +COPY requirements.txt requirements.txt +RUN python3 -m venv env +RUN env/bin/pip install --upgrade pip setuptools +RUN env/bin/pip install -r requirements.txt + +COPY *.py *.sh ./ +COPY login.txt ./ +COPY static static +COPY templates templates +COPY sandbox sandbox +RUN chown -R wikiapi:wikiapi /home/wikiapi/ + +USER wikiapi + +CMD env/bin/python download_imgs.py +## HOW TO PREVENT CMD RUNNING CONCURRENTLY?? +#CMD env/bin/python query2html.py diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..d0e2e28 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,11 @@ +certifi==2019.11.28 +chardet==3.0.4 +idna==2.8 +Jinja2==2.11.1 +MarkupSafe==1.1.1 +mwclient==0.10.0 +oauthlib==3.1.0 +requests==2.22.0 +requests-oauthlib==1.3.0 +six==1.14.0 +urllib3==1.25.8