calibre-web-companion/Dockerfile

35 lines
1.0 KiB
Docker
Raw Permalink Normal View History

2021-02-15 10:13:30 +00:00
FROM python:3.9.1-slim-buster
RUN apt-get clean && \
apt-get update && \
apt-get install -y nginx smbclient default-libmysqlclient-dev \
gcc python3-cffi libcairo2 libpango-1.0-0 libpangocairo-1.0-0 \
2021-02-15 11:08:23 +00:00
libgdk-pixbuf2.0-0 libffi-dev shared-mime-info uwsgi-core uwsgi-plugin-python3
2021-02-15 10:13:30 +00:00
# set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
RUN mkdir /cwebcomp
WORKDIR /cwebcomp
ADD . /cwebcomp/
2021-02-15 10:35:11 +00:00
# only add this next one if you have static files
2021-02-15 10:13:30 +00:00
RUN mkdir static
2021-02-15 10:41:31 +00:00
RUN pip install -r requirements.txt
2021-02-15 10:42:40 +00:00
RUN python CalibreWebCompanion/manage.py collectstatic
2021-02-15 10:13:30 +00:00
# only if you need celery
2021-02-15 10:35:11 +00:00
#RUN useradd -ms /bin/bash celery
#COPY broker/init.d_celeryd /etc/init.d/celeryd
#COPY broker/celeryd /etc/default/celeryd
2021-02-15 10:13:30 +00:00
# nginx config and script to be run
2021-02-15 10:41:31 +00:00
COPY deployment/docker/nginx.conf /etc/nginx/sites-available/default
COPY deployment/docker/start.sh /usr/local/bin/start.sh
2021-02-15 10:13:30 +00:00
# set proper file permissions
2021-02-15 10:41:31 +00:00
RUN chmod u+x /usr/local/bin/start.sh
2021-02-15 10:13:30 +00:00
EXPOSE 80
CMD ["/bin/bash", "-c", "start.sh"]