81 lines
1.4 KiB
YAML
81 lines
1.4 KiB
YAML
---
|
|
services:
|
|
db:
|
|
image: postgres:17
|
|
|
|
networks:
|
|
- backend-network
|
|
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
|
|
restart: unless-stopped
|
|
|
|
environment:
|
|
POSTGRES_USER: ${CHITAI_POSTGRES_USER}
|
|
POSTGRES_PASSWORD: ${CHITAI_POSTGRES_PASSWORD}
|
|
POSTGRES_DB: ${CHITAI_POSTGRES_DB}
|
|
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ${CHITAI_POSTGRES_USER} -d ${CHITAI_POSTGRES_DB}"]
|
|
interval: 10s
|
|
timeout: 3s
|
|
retries: 5
|
|
|
|
|
|
backend:
|
|
build: ./backend
|
|
|
|
networks:
|
|
- backend-network
|
|
- frontend-network
|
|
|
|
ports:
|
|
- "8000:8000"
|
|
|
|
volumes:
|
|
# Bind mount your libraries into /app/libraries/
|
|
# - ./books:/app/libraries/books
|
|
# ...
|
|
# Or bind mount entire libraries folder
|
|
- ./libraries:/app/libraries
|
|
|
|
# Mount book covers directory
|
|
- book_covers:/app/covers
|
|
|
|
restart: unless-stopped
|
|
|
|
env_file:
|
|
- .env
|
|
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
|
|
frontend:
|
|
build: ./frontend
|
|
|
|
networks:
|
|
- frontend-network
|
|
|
|
ports:
|
|
- "3000:3000"
|
|
|
|
restart: unless-stopped
|
|
|
|
environment:
|
|
VITE_BACKEND_API_URL: ${CHITAI_API_URL}
|
|
|
|
depends_on:
|
|
backend:
|
|
condition: service_healthy
|
|
|
|
volumes:
|
|
postgres_data:
|
|
book_covers:
|
|
|
|
networks:
|
|
frontend-network:
|
|
backend-network:
|
|
|