This repository has been archived on 2023-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
python-blog/Dockerfile

31 lines
719 B
Docker
Raw Normal View History

2020-11-11 08:52:48 +01:00
FROM alpine/git:v2.26.2 AS git
2020-09-09 18:32:46 +02:00
ADD . /app
WORKDIR /app
RUN git rev-parse HEAD | tee /version
2020-08-17 08:23:00 +02:00
FROM python:3.8.5-slim
2020-08-17 12:51:21 +02:00
RUN apt-get update \
&& apt-get install -y curl \
&& echo "Europe/Paris" > /etc/timezone \
&& mkdir /app && mkdir /db
2020-08-17 08:23:00 +02:00
WORKDIR /app
COPY requirements.txt ./
RUN pip install -r requirements.txt
2020-09-05 09:13:50 +02:00
COPY manage.py LICENSE .pre-commit-config.yaml pyproject.toml requirements-dev.txt ./
2020-08-17 08:23:00 +02:00
COPY docker ./docker/
COPY blog ./blog/
2020-08-27 22:28:14 +02:00
COPY attachments ./attachments/
COPY articles ./articles/
2020-09-09 18:32:46 +02:00
COPY --from=git /version /app/.version
2020-08-17 08:23:00 +02:00
ENV SECRET_KEY "changeme"
ENV DEBUG "false"
ENV HOST ""
ENV DB_BASE_DIR "/db"
HEALTHCHECK --start-period=30s CMD curl -f http://localhost:8000
CMD ["/app/docker/run.sh"]