mirror of
https://github.com/fergalmoran/bitchmin.git
synced 2026-02-15 20:34:50 +00:00
27 lines
703 B
Docker
27 lines
703 B
Docker
FROM python:3.7-alpine
|
|
|
|
COPY ./requirements.txt /requirements.txt
|
|
|
|
RUN apk update && \
|
|
apk add --no-cache --virtual build-deps gcc python3-dev musl-dev bind-tools lapack libstdc++ && \
|
|
apk --no-cache add --virtual .builddeps g++ gcc gfortran musl-dev lapack-dev && \
|
|
apk add postgresql-dev && \
|
|
pip install scipy && apk del .builddeps && rm -rf /root/.cache && \
|
|
pip install -r requirements.txt
|
|
|
|
RUN pip install -r requirements.txt
|
|
RUN pip install gunicorn
|
|
|
|
COPY app /app
|
|
COPY migrations /migrations
|
|
COPY server.py boot.sh ./
|
|
RUN chmod +x boot.sh
|
|
|
|
ENV FLASK_ENV production
|
|
ENV FLASK_APP server.py
|
|
|
|
RUN chown -R bitchmin:bitchmin ./
|
|
USER bitchmin
|
|
|
|
EXPOSE 5000
|
|
ENTRYPOINT ["./boot.sh"] |