2019-03-11 17:44:34 +08:00
|
|
|
FROM python:3.7-alpine3.9
|
2017-10-23 10:47:26 +08:00
|
|
|
|
2017-10-23 20:59:44 +08:00
|
|
|
ENV OJ_ENV production
|
2017-10-23 10:47:26 +08:00
|
|
|
|
2017-11-25 03:37:40 +08:00
|
|
|
ADD . /app
|
2017-11-25 13:11:24 +08:00
|
|
|
WORKDIR /app
|
2017-11-25 19:12:37 +08:00
|
|
|
|
2017-12-01 19:03:30 +08:00
|
|
|
HEALTHCHECK --interval=5s --retries=3 CMD python2 /app/deploy/health_check.py
|
|
|
|
|
2017-12-04 15:29:55 +08: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 19:12:37 +08:00
|
|
|
apk del build-base --purge
|
2017-12-04 15:29:55 +08:00
|
|
|
|
2017-11-25 13:11:24 +08: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 19:03:30 +08:00
|
|
|
|
2017-12-22 23:33:00 +08:00
|
|
|
ENTRYPOINT /app/deploy/entrypoint.sh
|