version: "3.8" services: postgres: image: docker.m.daocloud.io/library/postgres:16-alpine container_name: finetune-postgres restart: unless-stopped environment: POSTGRES_DB: finetuning POSTGRES_USER: finetune POSTGRES_PASSWORD: finetune123 volumes: - pgdata:/var/lib/postgresql/data ports: - "5432:5432" network_mode: host backend: build: context: ./backend dockerfile: Dockerfile container_name: finetune-backend restart: unless-stopped ports: - "8010:8010" volumes: - ./backend/data:/home/ubuntu/Fine-tuning/backend/data env_file: - ./backend/.env environment: - BACKEND_HOST=0.0.0.0 - BACKEND_PORT=8010 - DATABASE_URL=postgresql+asyncpg://finetune:finetune123@localhost:5432/finetuning deploy: resources: reservations: devices: - driver: nvidia count: all capabilities: [gpu] network_mode: host depends_on: - postgres frontend: build: context: ./frontend dockerfile: Dockerfile args: VITE_API_BASE_URL: http://localhost:8010/api/v1 VITE_WS_BASE_URL: ws://localhost:8010/ws container_name: finetune-frontend restart: unless-stopped ports: - "5173:80" volumes: pgdata: