-
Notifications
You must be signed in to change notification settings - Fork 8
/
Dockerfile
42 lines (32 loc) · 1.11 KB
/
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
34
35
36
37
38
39
40
41
42
# syntax=docker/dockerfile:1
FROM python:3.11-bookworm
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
ENV POETRY_VIRTUALENVS_CREATE=false
ENV POETRY_VERSION=1.6.1
WORKDIR /usr/src/ephios
RUN apt-get update && \
apt-get install -y --no-install-recommends \
gettext \
supervisor \
locales && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
RUN dpkg-reconfigure locales && \
locale-gen C.UTF-8 && \
/usr/sbin/update-locale LANG=C.UTF-8
RUN pip install "poetry==$POETRY_VERSION" gunicorn
RUN poetry self add "poetry-dynamic-versioning[plugin]"
RUN mkdir -p /var/ephios/data/ && \
mkdir -p /var/log/supervisord/ && \
mkdir -p /var/run/supervisord/
COPY . /usr/src/ephios
RUN poetry install --all-extras --without=dev
COPY deployment/docker/entrypoint.sh /usr/local/bin/ephios
RUN chmod +x /usr/local/bin/ephios
COPY deployment/docker/supervisord.conf /etc/supervisord.conf
COPY deployment/docker/cron.sh /usr/local/bin/cron.sh
RUN chmod +x /usr/local/bin/cron.sh
ENTRYPOINT ["ephios"]
CMD ["run"]
HEALTHCHECK CMD curl -f http://localhost:80/healthcheck || exit 1