Files
writer-ide/docker-compose.yml
admin 46af290db3
Build and Push Docker Images / build-and-push (push) Failing after 3m33s
initial commit
2026-11-07 16:39:43 +03:00

65 lines
1.7 KiB
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
version: '3.8'
services:
# Backend (FastAPI)
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: writer-ide-backend
restart: unless-stopped
ports:
- "8000:8000"
env_file:
- .env
environment:
- DATA_DIR=/app/data
- OLLAMA_BASE_URL=${OLLAMA_BASE_URL:-http://host.docker.internal:11434}
- ENVIRONMENT=production
volumes:
# Монтируем HDD с данными в контейнер
- ${DATA_VOLUME_PATH:-/mnt/data/writer-ide}:/app/data
# Монтируем .env файл (опционально, если нужен hot-reload)
- ./backend/.env:/app/.env:ro
extra_hosts:
# Для доступа к Ollama на хосте (Linux)
- "host.docker.internal:host-gateway"
networks:
- writer-ide-network
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/api/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
# Frontend (Next.js)
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: writer-ide-frontend
restart: unless-stopped
ports:
- "3000:3000"
environment:
- NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL:-http://localhost:8000/api}
- NODE_ENV=production
depends_on:
backend:
condition: service_healthy
networks:
- writer-ide-network
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3000"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
networks:
writer-ide-network:
driver: bridge
# Volumes не определяем явно, так как используем bind mount с HDD