Compare commits
3 Commits
9c045d6ed0
...
b9263eda02
Author | SHA1 | Date |
---|---|---|
Jimmy | b9263eda02 | |
Jimmy | 8e708c9596 | |
Jimmy | 850648dfe3 |
11
Dockerfile
11
Dockerfile
|
@ -1,6 +1,13 @@
|
||||||
FROM tiangolo/uvicorn-gunicorn-fastapi:python3.8-slim
|
FROM tiangolo/uvicorn-gunicorn-fastapi:python3.8-slim
|
||||||
ENV DOCKER=1
|
ENV DOCKER=1
|
||||||
|
|
||||||
COPY ./requirements.txt /
|
RUN pip install fastapi \
|
||||||
RUN pip install -r /requirements.txt && rm /requirements.txt
|
fastapi-responses \
|
||||||
|
uvicorn[standard] \
|
||||||
|
python-jose[cryptography] \
|
||||||
|
pytest \
|
||||||
|
requests \
|
||||||
|
pytest-asyncio \
|
||||||
|
passlib \
|
||||||
|
python-multipart
|
||||||
COPY ./app /app/app
|
COPY ./app /app/app
|
|
@ -0,0 +1,14 @@
|
||||||
|
version: '3.7'
|
||||||
|
|
||||||
|
services:
|
||||||
|
app:
|
||||||
|
build: .
|
||||||
|
env_file:
|
||||||
|
- .env
|
||||||
|
ports:
|
||||||
|
- 8000:8000
|
||||||
|
tty: true
|
||||||
|
stdin_open: true
|
||||||
|
volumes:
|
||||||
|
- ./app:/app/app
|
||||||
|
command: uvicorn app.main:app --host 0.0.0.0 --reload
|
|
@ -0,0 +1,14 @@
|
||||||
|
version: '3.7'
|
||||||
|
|
||||||
|
services:
|
||||||
|
app:
|
||||||
|
build: .
|
||||||
|
env_file:
|
||||||
|
- .env
|
||||||
|
ports:
|
||||||
|
- 8000:80
|
||||||
|
tty: true
|
||||||
|
stdin_open: true
|
||||||
|
volumes:
|
||||||
|
- ./app:/app/app
|
||||||
|
command: pytest app/test/test_main.py -s
|
Loading…
Reference in New Issue