This commit is contained in:
2026-05-24 01:16:07 +08:00
commit 2ece5174a7
35 changed files with 2583 additions and 0 deletions

40
docker-compose.yml Normal file
View File

@@ -0,0 +1,40 @@
version: '3.8'
services:
db:
image: postgres:16-alpine
environment:
POSTGRES_USER: pharma
POSTGRES_PASSWORD: pharma123
POSTGRES_DB: pharma_news
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U pharma"]
interval: 5s
timeout: 5s
retries: 5
backend:
build: ./backend
env_file: .env
ports:
- "8000:8000"
depends_on:
db:
condition: service_healthy
volumes:
- ./backend:/app
command: uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
frontend:
build: ./frontend
ports:
- "3000:80"
depends_on:
- backend
volumes:
postgres_data: