Parcourir la source

major fixes for container release

spacexerq il y a 1 semaine
Parent
commit
d454d50440
3 fichiers modifiés avec 5 ajouts et 5 suppressions
  1. 5 5
      Dockerfile
  2. 0 0
      app/__init__.py
  3. 0 0
      app/app.py

+ 5 - 5
Dockerfile

@@ -4,16 +4,16 @@ LABEL authors="nikita.babich"
 WORKDIR /app
 
 RUN apt-get update
-RUN apt-get install -y --no-install-recommend python3 python3-pip python3-venv ca-certificates
+RUN apt-get install -y --no-install-recommends python3 python3-pip python3-venv ca-certificates python3-full
 RUN rm -rf /var/lib/apt/lists/
-
 RUN ln -sf /usr/bin/python3 /usr/local/bin/python
-
 COPY requirements.txt .
-RUN pip3 install --no-cache-dir -r requirements.txt
+RUN python3 -m venv .venv
+RUN . .venv/bin/activate
+RUN .venv/bin/pip install --no-cache-dir -r requirements.txt
 
 COPY . .
 
 EXPOSE 8888
 
-CMD ["gunicorn", "-w", "2", "-b", "0.0.0.0:8888", "app.app"]
+CMD [".venv/bin/gunicorn", "-w", "2", "-b", "0.0.0.0:8888", "app.app:app"]

+ 0 - 0
app/__init__.py


+ 0 - 0
app.py → app/app.py