Docker - install fittrackee in a virtual env

This commit is contained in:
Sam
2023-06-21 17:20:27 +02:00
parent fe7fbb52e9
commit 6324639064
5 changed files with 13 additions and 17 deletions

View File

@ -8,13 +8,12 @@ WORKDIR /usr/src/app
COPY . /usr/src/app
# install requirements
ENV VIRTUAL_ENV=/opt/venv
RUN python3 -m venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
RUN pip install --upgrade pip
RUN pip install poetry
RUN poetry config virtualenvs.create false
RUN poetry install --no-interaction --quiet
# create uploads folder
CMD mkdir /usr/src/app/uploads
RUN . $VIRTUAL_ENV/bin/activate && poetry install --no-interaction --quiet
# run fittrackee server
CMD flask run --with-threads -h 0.0.0.0