- Change Docker ports from 80/8000 to 8081/8080 (non-privileged) - Update CORS_ORIGINS in docker-compose.yml and .env.docker - Update all documentation (README.md, DOCKER.md) with new ports - Add Podman compatibility section to CHANGELOG.md - Enable podman-compose usage without root privileges
56 lines
1.2 KiB
YAML
56 lines
1.2 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
# Backend FastAPI
|
|
backend:
|
|
build:
|
|
context: ./backend
|
|
dockerfile: Dockerfile
|
|
container_name: notytex-backend
|
|
restart: unless-stopped
|
|
ports:
|
|
- "8080:8000"
|
|
environment:
|
|
- DATABASE_URL=sqlite+aiosqlite:////data/school_management.db
|
|
- SECRET_KEY=${SECRET_KEY:-change-me-in-production-min-32-chars}
|
|
- CORS_ORIGINS=["http://localhost:8081","http://localhost:8080","http://localhost:3000"]
|
|
- LOG_LEVEL=INFO
|
|
volumes:
|
|
- ./data:/data
|
|
- ./backend:/app
|
|
networks:
|
|
- notytex-network
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:8000/api/v2/health"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 40s
|
|
|
|
# Frontend Vue.js + Nginx
|
|
frontend:
|
|
build:
|
|
context: ./frontend
|
|
dockerfile: Dockerfile
|
|
container_name: notytex-frontend
|
|
restart: unless-stopped
|
|
ports:
|
|
- "8081:80"
|
|
depends_on:
|
|
- backend
|
|
networks:
|
|
- notytex-network
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost/"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
|
|
networks:
|
|
notytex-network:
|
|
driver: bridge
|
|
|
|
volumes:
|
|
data:
|
|
driver: local
|