mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2025-06-12 09:00:40 +00:00
Dockerize the Application.
This commit is contained in:
23
Dockerfile
23
Dockerfile
@ -1,6 +1,12 @@
|
||||
FROM python:3.6-alpine
|
||||
|
||||
|
||||
EXPOSE 5000
|
||||
|
||||
|
||||
ENV FLASK_APP=opaque.py
|
||||
|
||||
|
||||
RUN apk add \
|
||||
build-base \
|
||||
postgresql-dev
|
||||
@ -8,28 +14,15 @@ RUN apk add \
|
||||
|
||||
RUN adduser -D opaque
|
||||
USER opaque
|
||||
|
||||
|
||||
WORKDIR /home/opaque
|
||||
|
||||
|
||||
COPY app app
|
||||
COPY migrations migrations
|
||||
COPY config.py opaque.py ./
|
||||
COPY requirements.txt requirements.txt
|
||||
|
||||
|
||||
ENV FLASK_APP=opaque.py
|
||||
|
||||
|
||||
copy migrations migrations
|
||||
COPY config.py opaque.py requirements.txt ./
|
||||
RUN python -m venv venv && \
|
||||
venv/bin/pip install -r requirements.txt
|
||||
|
||||
|
||||
COPY docker-entrypoint.sh /usr/local/bin/
|
||||
|
||||
|
||||
EXPOSE 5000
|
||||
|
||||
|
||||
ENTRYPOINT ["docker-entrypoint.sh"]
|
||||
|
Reference in New Issue
Block a user