-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
30 lines (23 loc) · 912 Bytes
/
Dockerfile
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
FROM python:3.10
# This prevents Python from writing out pyc files
ENV PYTHONDONTWRITEBYTECODE 1
# This keeps Python from buffering stdin/stdout
ENV PYTHONUNBUFFERED 1
WORKDIR /backend
COPY requirements.txt /backend/
RUN apt-get update
RUN apt-get install -y python3 pip
RUN apt-get install -y ffmpeg
RUN pip install --upgrade pip
RUN pip install -r requirements.txt
COPY . /backend/
# ADD https://github.com/ufoscout/docker-compose-wait/releases/download/2.9.0/wait /wait
# RUN chmod +x /wait
# COPY wait-for-it.sh wait-for-it.sh
COPY wait-for-it.sh wait-for-it.sh
RUN chmod +x wait-for-it.sh
CMD ./wait-for-it.sh db:3306 -s -t 50 -- uvicorn --host=backend --port 8000 main:app --reload
# CMD uvicorn --host=0.0.0.0 --port 8000 main:app --reload
#./wait-for-it.sh localhost:3306 -s -t 30 --
# wait-for-it.sh host:port [-s] [-t timeout] [-- command args]
# CMD uvicorn --host=0.0.0.0 --port 8000 main:app