-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile-web
30 lines (20 loc) · 1.06 KB
/
Dockerfile-web
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
FROM python:3.10-bullseye
ARG POERTY_ARG
RUN curl -sSL https://install.python-poetry.org | python3 -
RUN ln -s /root/.local/share/pypoetry/venv/bin/poetry /usr/local/bin/
RUN apt-get update && apt-get install -y supervisor && rm -rf /var/lib/apt/lists/*
COPY ./docker/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
COPY ./pyproject.toml ./poetry.lock ./code/
WORKDIR /code
RUN poetry config virtualenvs.create false
RUN poetry install --no-root --no-cache --no-interaction $POETRY_ARG
#RUN python -m nltk.downloader all
#RUN python -c "import nltk; nltk.download('wordnet')"
#RUN python -c "import nltk; nltk.download('punkt')"
#RUN python -c "import nltk; nltk.download('averaged_perceptron_tagger')"
COPY ./ /code
# add --proxy-headers when running behind proxy
#CMD ["uvicorn", "web.main:app", "--host", "0.0.0.0", "--port", "80", "--reload", "--limit-concurrency", "10"]
CMD ["/usr/bin/supervisord"]
# gunicorn main:app --workers 4 --worker-class uvicorn.workers.UvicornWorker --bind 0.0.0.0:80
# uvicorn main:app --host 0.0.0.0 --port 80 --workers 4 --reload