* feat(docker): add Dockerfile to build container Also added related docs. It is worth mentioning that at this point the server used inside the docker container is the default Flask server, which is not production ready. Signed-off-by: Ameya Shenoy <shenoy.ameya@gmail.com> * feat(docker): server requests with gunicorn Signed-off-by: Ameya Shenoy <shenoy.ameya@gmail.com> * fix(docker): restructure to speed up build Signed-off-by: Ameya Shenoy <shenoy.ameya@gmail.com> * perf(docker): reduced image size Signed-off-by: Ameya Shenoy <shenoy.ameya@gmail.com>
22 lines
404 B
Docker
22 lines
404 B
Docker
FROM python:alpine
|
|
|
|
MAINTAINER Ameya Shenoy "shenoy.ameya@gmail.com"
|
|
|
|
COPY . /Buku
|
|
|
|
RUN set -ex \
|
|
&& apk add --no-cache --virtual .build-deps \
|
|
gcc \
|
|
openssl-dev \
|
|
musl-dev \
|
|
libffi-dev \
|
|
&& pip install -U --no-cache-dir \
|
|
pip \
|
|
gunicorn \
|
|
Buku[server] \
|
|
&& apk del .build-deps
|
|
|
|
ENTRYPOINT gunicorn --bind 0.0.0.0:5001 "Buku.bukuserver.server:create_app()"
|
|
EXPOSE 5001
|
|
|