Browse Source

use Docker

chenhaiyang 4 years ago
parent
commit
27ca47cbed
1 changed files with 12 additions and 0 deletions
  1. 12 0
      Dockerfile

+ 12 - 0
Dockerfile

@@ -0,0 +1,12 @@
+FROM tiangolo/uvicorn-gunicorn-fastapi:python3.8
+
+COPY requirements.txt .
+RUN pip install -r requirements.txt
+
+EXPOSE 80
+
+COPY .env /app/.env
+
+COPY ./app /app/app
+
+CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "80"]