2022-04-24 15:13:03 +02:00
|
|
|
FROM python:3.10
|
2021-01-31 11:30:37 +01:00
|
|
|
|
|
|
|
# set working directory
|
|
|
|
RUN mkdir -p /usr/src/app
|
|
|
|
WORKDIR /usr/src/app
|
|
|
|
|
|
|
|
# copy source files
|
|
|
|
COPY . /usr/src/app
|
|
|
|
|
|
|
|
# install requirements
|
2023-06-21 17:20:27 +02:00
|
|
|
ENV VIRTUAL_ENV=/opt/venv
|
|
|
|
RUN python3 -m venv $VIRTUAL_ENV
|
|
|
|
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
|
2021-01-31 11:30:37 +01:00
|
|
|
RUN pip install --upgrade pip
|
|
|
|
RUN pip install poetry
|
2023-06-21 17:20:27 +02:00
|
|
|
RUN . $VIRTUAL_ENV/bin/activate && poetry install --no-interaction --quiet
|
2021-01-31 11:30:37 +01:00
|
|
|
|
|
|
|
# run fittrackee server
|
|
|
|
CMD flask run --with-threads -h 0.0.0.0
|