#7 Docker container should be creating its own venv, not using host's venv.
This commit is contained in:
@@ -3,8 +3,14 @@ FROM python:3.10.9
|
|||||||
WORKDIR /tmp
|
WORKDIR /tmp
|
||||||
RUN python -m venv venv
|
RUN python -m venv venv
|
||||||
COPY ./requirements.txt /code/requirements.txt
|
COPY ./requirements.txt /code/requirements.txt
|
||||||
|
RUN . venv/bin/activate
|
||||||
RUN python -m pip install -r /code/requirements.txt
|
RUN python -m pip install -r /code/requirements.txt
|
||||||
|
COPY venv /code/venv
|
||||||
|
|
||||||
WORKDIR /code
|
WORKDIR /code
|
||||||
COPY ./ /code
|
COPY app app
|
||||||
|
COPY main.py main.py
|
||||||
|
COPY config.py config.py
|
||||||
|
COPY boot.sh boot.sh
|
||||||
|
COPY migrations migrations
|
||||||
CMD sh boot.sh
|
CMD sh boot.sh
|
||||||
|
|||||||
@@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
. ./venv/bin/activate
|
. ./venv/bin/activate
|
||||||
|
|
||||||
pip install -r ./requirements.txt
|
|
||||||
|
|
||||||
flask db upgrade
|
flask db upgrade
|
||||||
|
|
||||||
exec gunicorn -b :5000 --access-logfile - --error-logfile - main:app
|
exec gunicorn -b :5000 --access-logfile - --error-logfile - main:app
|
||||||
|
|||||||
Reference in New Issue
Block a user