# syntax=docker/dockerfile:1

FROM python:3.8-slim-buster

WORKDIR /padel

# set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1

# install system dependencies
RUN apt-get update && apt-get install -y sqlite3

COPY requirements.txt requirements.txt
RUN pip3 install -r requirements.txt

COPY . .

# CMD [ "python3", "-m" , "flask", "--app", "padel", "run", "--host=0.0.0.0"]
#CMD [ "python3", "-m" , "flask", "run", "--host=0.0.0.0"]


# run entrypoint.sh
ENTRYPOINT ["/padel/entrypoint.sh"]