Skip to content

Latest commit

 

History

History
24 lines (16 loc) · 873 Bytes

Dockerfile.rest

File metadata and controls

24 lines (16 loc) · 873 Bytes

# docker build . -f Dockerfile.rest -t reecepbcups/api-cache:latest # docker run -e REST_URL=http://15.204.143.232:1317 -e DISABLE_SWAGGER_UI=false -e REST_WORKER_THREADS=1 -e REMOTE_CONFIG_TIME_FILE=https://raw.githubusercontent.com/Reecepbcups/cosmos-endpoint-cache/main/configs/cache_times.json -p 5000:5000 reecepbcups/api-cache:latest

FROM python:3.11

RUN apt-get clean
&& apt-get -y update
RUN apt-get -y install nginx
&& apt-get -y install python3-dev && apt-get -y install build-essential

COPY requirements/requirements.txt /srv/flask_app/requirements/requirements.txt RUN pip install -r /srv/flask_app/requirements/requirements.txt --src /usr/local/src

COPY . /srv/flask_app WORKDIR /srv/flask_app

EXPOSE 5000

# You can set this at run time with -e ENV REST_WORKER_THREADS=1

CMD gunicorn -w ${REST_WORKER_THREADS} -b 0.0.0.0:5000 rest:app