DenCT/test-storage / System Design /Docker Related.md
DenCT's picture
|
download
raw
963 Bytes
# Issues faced previously
## Docker Compose
Typically, if I need to deploy a FastAPI app with postgresql database and GPU support, I need to have this template docker-compose setup:
```yaml
version: '3'
services:
fastapi:
build: .
depends_on:
- postgres
command: uvicorn main:app --host 0.0.0.0 --port 8080
environment:
- DATABASE_URL="postgresql://postgres:Pillsgap0506@postgres/postgres"
volumes:
- ./:/app:ro
ports:
- "8080:8080"
expose:
- 8080
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
postgres:
image: postgres:15-alpine
volumes:
- postgres_data:/var/lib/postgresql/data/
expose:
- 5432
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=Pillsgap0506
- POSTGRES_DB=postgres
volumes:
postgres_data:
```

Xet Storage Details

Size:
963 Bytes
·
Xet hash:
d9dfa1451b22915abc7d08226bf360fe8c4c194bf8dc1a746a29e9a995805cd8

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.