2021-11-18 04:38:49 +00:00
|
|
|
FROM python:3.8-alpine3.14
|
2017-10-23 02:47:26 +00:00
|
|
|
|
2017-10-23 12:59:44 +00:00
|
|
|
ENV OJ_ENV production
|
2017-10-23 02:47:26 +00:00
|
|
|
|
2017-11-24 19:37:40 +00:00
|
|
|
ADD . /app
|
2017-11-25 05:11:24 +00:00
|
|
|
WORKDIR /app
|
2017-11-25 11:12:37 +00:00
|
|
|
|
2021-11-18 04:38:49 +00:00
|
|
|
HEALTHCHECK --interval=5s --retries=3 CMD python3 /app/deploy/health_check.py
|
2017-12-01 11:03:30 +00:00
|
|
|
|
2017-12-04 07:29:55 +00:00
|
|
|
RUN apk add --update --no-cache build-base nginx openssl curl unzip supervisor jpeg-dev zlib-dev postgresql-dev freetype-dev && \
|
|
|
|
pip install --no-cache-dir -r /app/deploy/requirements.txt && \
|
2017-11-25 11:12:37 +00:00
|
|
|
apk del build-base --purge
|
2017-12-04 07:29:55 +00:00
|
|
|
|
2017-11-25 05:11:24 +00:00
|
|
|
RUN curl -L $(curl -s https://api.github.com/repos/QingdaoU/OnlineJudgeFE/releases/latest | grep /dist.zip | cut -d '"' -f 4) -o dist.zip && \
|
|
|
|
unzip dist.zip && \
|
|
|
|
rm dist.zip
|
2017-12-01 11:03:30 +00:00
|
|
|
|
2017-12-22 15:33:00 +00:00
|
|
|
ENTRYPOINT /app/deploy/entrypoint.sh
|