changes for docker deployment
This commit is contained in:
22
Dockerfile
Normal file
22
Dockerfile
Normal file
@@ -0,0 +1,22 @@
|
||||
FROM tiangolo/uwsgi-nginx-flask:python3.8-alpine AS builder
|
||||
|
||||
RUN python -m venv /opt/venv
|
||||
# Make sure we use the virtualenv:
|
||||
ENV PATH="/opt/venv/bin:$PATH"
|
||||
|
||||
RUN apk add --no-cache --virtual .build-deps ca-certificates gcc linux-headers \
|
||||
musl-dev jpeg-dev zlib-dev libffi-dev git make \
|
||||
&& pip install --upgrade pip
|
||||
|
||||
COPY ./requirements.txt /app/requirements.txt
|
||||
RUN pip install wheel && pip install -r requirements.txt
|
||||
|
||||
|
||||
FROM tiangolo/uwsgi-nginx-flask:python3.8-alpine
|
||||
|
||||
#ENV LISTEN_PORT 8080
|
||||
COPY --from=builder /opt/venv /opt/venv
|
||||
COPY ./fotos-nginx.conf /etc/nginx/conf.d/fetfotos2020.conf
|
||||
ENV PATH="/opt/venv/bin:$PATH"
|
||||
|
||||
COPY . /app
|
||||
Reference in New Issue
Block a user