-
Notifications
You must be signed in to change notification settings - Fork 86
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (27 loc) · 940 Bytes
/
Dockerfile
File metadata and controls
35 lines (27 loc) · 940 Bytes
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
FROM python:3.13
RUN apt-get update && apt-get upgrade -y
RUN apt-get install -y less vim wget
# Intall NEMO (in the current directory) and Gunicorn
COPY . /nemo/
RUN python3 -m pip install --upgrade pip
RUN python3 -m pip install /nemo/ gunicorn==23.0.0
RUN rm --recursive --force /nemo/
RUN mkdir /nemo
WORKDIR /nemo
ENV DJANGO_SETTINGS_MODULE="settings"
ENV PYTHONPATH="/nemo/"
# Gunicorn config options
ENV GUNICORN_WORKER_CLASS=""
ENV GUNICORN_WORKER_COUNT=""
ENV GUNICORN_THREAD_COUNT=""
ENV GUNICORN_KEEPALIVE_SECONDS=""
ENV GUNICORN_CAPTURE_OUTPUT=""
# NEMO extra python packages
ENV NEMO_EXTRA_PIP_PACKAGES=""
COPY gunicorn_configuration.py /etc/
EXPOSE 8000/tcp
HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 \
CMD wget -qO- http://localhost:8000/health/ || exit 1
COPY start_NEMO_in_Docker.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/start_NEMO_in_Docker.sh
CMD ["start_NEMO_in_Docker.sh"]