updated the architecture

This commit is contained in:
rarebuffalo
2026-04-07 18:13:43 +05:30
parent 087d8ffaee
commit 8330060e86
66 changed files with 3484 additions and 130 deletions

34
docker-compose.yml Normal file
View File

@@ -0,0 +1,34 @@
services:
db:
image: postgres:16-alpine
environment:
POSTGRES_USER: securelens
POSTGRES_PASSWORD: securelens
POSTGRES_DB: securelens
ports:
- "5433:5432"
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U securelens"]
interval: 5s
timeout: 5s
retries: 5
backend:
build: .
ports:
- "8000:8000"
env_file:
- .env
environment:
DATABASE_URL: postgresql+asyncpg://securelens:securelens@db:5432/securelens
volumes:
- .:/app
command: uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
depends_on:
db:
condition: service_healthy
volumes:
pgdata: