Updated deployment instructions and container

This commit is contained in:
Dmitriy Shishkov 2023-08-16 09:35:22 +03:00
parent 0468125b23
commit f345ed6587
Signed by: dm1sh
GPG Key ID: 027994B0AA357688
4 changed files with 25 additions and 26 deletions

View File

@ -11,4 +11,4 @@ COPY requirements.txt .
RUN pip install --no-cache-dir --upgrade -r requirements.txt
COPY ./back ./back
COPY --from=builder /src/dist ./front/dist
CMD uvicorn back.main:app --host 0.0.0.0 --port 80
CMD python -m back.main

View File

@ -4,9 +4,9 @@ Food and other stuff sharing platform. The service was developed during Digital
Members:
* Dmitry Gantimurov - Backend
* Dmitriy Shishkov - Frontend
* Vladimir Yakovlev - Backend & Design
* Dmitry Gantimurov - Chief Backend
* Dmitriy Shishkov - Frontend & Interface Design
* Vladimir Yakovlev - Backend & Graphical Design
## Dev build instructions
@ -25,7 +25,7 @@ Backend:
```sh
pip install -r requirements.txt
uvicorn back.main:app --reload
python -m back.main
```
## Deploy instructions
@ -35,5 +35,5 @@ Only docker/podman are required
```sh
docker build . -t porridger:build
docker run --name porridger -p 8080:80 -v ./sql_app.db:/srv/sql_app.db -v uploads:/srv/uploads porridger:build
docker run --name porridger -p 8000:8000 -v ./sql_app.db:/srv/sql_app.db -v uploads:/srv/uploads -v poem_pic:/srv/poem_pic porridger:build
```

View File

@ -16,7 +16,7 @@ class Server(uvicorn.Server):
async def main():
"Run scheduler and the API"
server = Server(config=uvicorn.Config(app_fastapi, workers=1, loop="asyncio"))
server = Server(config=uvicorn.Config(app_fastapi, workers=1, loop="asyncio", host="0.0.0.0"))
api = asyncio.create_task(server.serve())
sched = asyncio.create_task(app_rocketry.serve())

View File

@ -1,31 +1,30 @@
anyio==3.6.2
certifi==2023.5.7
charset-normalizer==3.1.0
click==8.1.3
annotated-types==0.5.0
anyio==3.7.1
certifi==2023.7.22
charset-normalizer==3.2.0
click==8.1.6
ecdsa==0.18.0
fastapi==0.95.1
fastapi==0.101.1
greenlet==2.0.2
h11==0.14.0
httptools==0.5.0
idna==3.4
Jinja2==3.1.2
MarkupSafe==2.1.2
MarkupSafe==2.1.3
passlib==1.7.4
pyasn1==0.5.0
pydantic==1.10.7
python-dotenv==1.0.0
pydantic==1.10.10
pydantic_core==2.4.0
python-dateutil==2.8.2
python-jose==3.3.0
python-multipart==0.0.6
PyYAML==6.0
requests==2.30.0
redbird==0.7.1
requests==2.31.0
rocketry==2.5.1
rsa==4.9
six==1.16.0
sniffio==1.3.0
SQLAlchemy==2.0.13
starlette==0.26.1
typing_extensions==4.5.0
urllib3==2.0.2
uvicorn==0.22.0
uvloop==0.17.0
watchfiles==0.19.0
websockets==11.0.3
SQLAlchemy==2.0.20
starlette==0.27.0
typing_extensions==4.7.1
urllib3==2.0.4
uvicorn==0.23.2