Maksymilian Jankowski commited on
Commit
7884075
·
1 Parent(s): 0b359eb

fix deploy

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -14
Dockerfile CHANGED
@@ -12,9 +12,9 @@ WORKDIR /code
12
  COPY requirements.txt .
13
  RUN pip install --no-cache-dir -r requirements.txt
14
 
15
- # ---- Install system packages (redis-server, supervisor) -------------------
16
  RUN apt-get update && \
17
- apt-get install -y --no-install-recommends redis-server supervisor && \
18
  rm -rf /var/lib/apt/lists/*
19
 
20
  # ---- Copy project code ----------------------------------------------------
@@ -34,16 +34,5 @@ celery -A utils.worker worker --pool=solo --loglevel=info --detach\n\
34
  exec uvicorn main:app --host 0.0.0.0 --port=${PORT:-7860}\n\
35
  ' > /code/start.sh && chmod +x /code/start.sh
36
 
37
- # ---- Fallback: Copy supervisor config if it exists -----------------------
38
- RUN if [ -f deploy/supervisord.conf ]; then \
39
- cp deploy/supervisord.conf /etc/supervisor/conf.d/supervisord.conf; \
40
- echo "Using supervisor"; \
41
- fi
42
-
43
  # ---- Start everything -----------------------------------------------------
44
- # Try supervisor first, fallback to simple script
45
- CMD if [ -f /etc/supervisor/conf.d/supervisord.conf ]; then \
46
- /usr/bin/supervisord -n; \
47
- else \
48
- /code/start.sh; \
49
- fi
 
12
  COPY requirements.txt .
13
  RUN pip install --no-cache-dir -r requirements.txt
14
 
15
+ # ---- Install system packages (redis-server) -------------------
16
  RUN apt-get update && \
17
+ apt-get install -y --no-install-recommends redis-server && \
18
  rm -rf /var/lib/apt/lists/*
19
 
20
  # ---- Copy project code ----------------------------------------------------
 
34
  exec uvicorn main:app --host 0.0.0.0 --port=${PORT:-7860}\n\
35
  ' > /code/start.sh && chmod +x /code/start.sh
36
 
 
 
 
 
 
 
37
  # ---- Start everything -----------------------------------------------------
38
+ CMD ["/code/start.sh"]