Dockerize the app

This commit is contained in:
Roman Mogylatov 2021-02-04 08:56:54 -05:00
parent e000f821b3
commit 6270b88caf
2 changed files with 24 additions and 0 deletions

View File

@ -0,0 +1,13 @@
FROM python:3.9-buster
ENV PYTHONUNBUFFERED=1
ENV HOST=0.0.0.0
ENV PORT=8000
WORKDIR /code
COPY . /code/
RUN pip install --upgrade pip \
&& pip install -r requirements.txt
CMD uvicorn webapp.application:app --host ${HOST} --port ${PORT}

View File

@ -0,0 +1,11 @@
version: "3.7"
services:
webapp:
build: ./
image: webapp
ports:
- "8000:8000"
volumes:
- "./:/code"