-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
37 lines (28 loc) · 992 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
FROM python:3.11-slim AS requirements-stage
WORKDIR /tmp
RUN pip install poetry
COPY ./pyproject.toml ./poetry.lock* /tmp/
RUN poetry export -f requirements.txt --output requirements.txt --without-hashes
FROM python:3.11
WORKDIR /code
ARG USER
ARG ATHLETE
ARG EMAIL
ARG ALTERNATIVE_EMAIL
ENV USER=${USER}
ENV ATHLETE=${ATHLETE}
ENV EMAIL=${EMAIL}
ENV ALTERNATIVE_EMAIL=${ALTERNATIVE_EMAIL}
COPY --from=requirements-stage /tmp/requirements.txt /code/requirements.txt
# ENV PATH /home/${USERNAME}/.local/bin:${PATH}
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
# COPY .env .env
COPY ./src /code/src
COPY ./data /code/data
COPY .config/config.yml /code/.config/config.yml
# COPY ./app /code/app
EXPOSE 8000
CMD ["uvicorn", "src.main:app", "--host", "0.0.0.0", "--port", "8000", "--reload"]
# CMD ["python", "src/main.py"]
# CMD ["uvicorn", "src.main:app", "--host", "0.0.0.0", "--port", "80"]
# CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "80"]