File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5757 ports :
5858 - containerPort : 8000
5959 {{- if eq .Values.stage "development" }}
60- command : ["/app/{{ .Values.identifier }}/.venv/bin/python "]
61- args : ["src/main.py"]
60+ command : ["nodemon "]
61+ args : ["--exec", "/app/{{ .Values.identifier }}/.venv/bin/python src/main.py"]
6262 workingDir : /app/{{ .Values.identifier }}
6363 {{- end }}
6464 env :
Original file line number Diff line number Diff line change @@ -6,6 +6,16 @@ ARG FOLDER=/app
66COPY --chown=1000:1000 . /app
77WORKDIR ${FOLDER}
88
9+ # Install Node.js and nodemon for easy watch mode with Python
10+ USER root
11+ RUN apt-get update \
12+ && apt-get install -y curl \
13+ && curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
14+ && apt-get install -y nodejs \
15+ && npm install -g nodemon \
16+ && apt-get clean \
17+ && rm -rf /var/lib/apt/lists/*
18+
919USER 1000:1000
1020
1121# Setup venv
@@ -15,4 +25,4 @@ EXPOSE 8000
1525ENV PORT=8000
1626ENV HOST="0.0.0.0"
1727
18- CMD .venv/bin/python src/main.py
28+ CMD ["nodemon", "--exec", " .venv/bin/python src/main.py"]
You can’t perform that action at this time.
0 commit comments