plan291037 commited on
Commit
3c9b666
·
verified ·
1 Parent(s): 3f99a4f

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -3
Dockerfile CHANGED
@@ -19,9 +19,13 @@ WORKDIR /app
19
  COPY requirements.txt /app/
20
  RUN pip install --no-cache-dir -r requirements.txt
21
 
22
- # ให้ seleniumbase/undetected-chromedriver เขียนลงโฟลเดอร์ drivers ได้
23
- RUN python - <<'PY'\nimport sysconfig, pathlib, os\np = pathlib.Path(sysconfig.get_paths()['purelib'])/'seleniumbase'/'drivers'\np.mkdir(parents=True, exist_ok=True)\nos.system(f'chmod -R a+rwX {p}')\nPY
 
 
 
 
24
 
25
  COPY app.py /app/app.py
26
 
27
- CMD ["gunicorn","-w","1","--threads","1","-k","uvicorn.workers.UvicornWorker","--bind","0.0.0.0:${PORT}","app:app"]
 
19
  COPY requirements.txt /app/
20
  RUN pip install --no-cache-dir -r requirements.txt
21
 
22
+ RUN python - <<'PY'
23
+ import sysconfig, pathlib, os
24
+ p = pathlib.Path(sysconfig.get_paths()['purelib'])/'seleniumbase'/'drivers'
25
+ p.mkdir(parents=True, exist_ok=True)
26
+ os.system(f"chmod -R a+rwX {p}")
27
+ PY
28
 
29
  COPY app.py /app/app.py
30
 
31
+ CMD ["bash","-lc","gunicorn -w 1 --threads 1 -k uvicorn.workers.UvicornWorker --bind 0.0.0.0:$PORT app:app"]