-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
33 lines (26 loc) · 914 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
FROM python:3.10-alpine
LABEL maintainer=kungfudiscomonkey@gmail.com
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
ENV APP_DIR /usr/src/app
ENV STATIC_ROOT /var/cache/app
# Upgrade Pip
RUN pip install --no-cache-dir -U pip
RUN apk add --no-cache tini
# Install Postgres Support
RUN set -ex \
&& apk add --no-cache postgresql-dev \
&& apk add --no-cache --virtual build-deps build-base \
&& pip install --no-cache-dir psycopg2-binary \
&& apk del build-deps
# Finish installing app
WORKDIR ${APP_DIR}
ADD caldav_framework ${APP_DIR}/caldav_framework
COPY docker ${APP_DIR}/docker
COPY setup.* ${APP_DIR}/
RUN set -ex && pip install --no-cache-dir -r ${APP_DIR}/docker/requirements.txt -e .[standalone]
RUN todo-server collectstatic --noinput
USER nobody
EXPOSE 8000
ENTRYPOINT ["/sbin/tini", "--"]
CMD ["gunicorn", "caldav_framework.standalone.wsgi:application", "-b", "0.0.0.0:8000"]