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" networks: - finetune-net backend: build: context: ./backend dockerfile: Dockerfile container_name: finetune-backend restart: unless-stopped 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@postgres:5432/finetuning ports: - "8010:8010" deploy: resources: reservations: devices: - driver: nvidia count: all capabilities: [gpu] depends_on: - postgres networks: - finetune-net 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: - "80:3000" networks: finetune-net: driver: bridge volumes: pgdata: