Vertical.ai / docker-compose.yml
Abhisingh-18's picture
Mirror of github.com/Abhisingh18/Vertical.ai
1f7ead8 verified
Raw
History Blame Contribute Delete
1.89 kB
services:
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: vertical-frontend
restart: always
ports:
- "80:80"
depends_on:
backend:
condition: service_healthy
# Prevent frontend from hogging memory (unlikely but safe)
mem_limit: 512m
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: vertical-backend
restart: always
ports:
- "8000:8000"
env_file:
- .env
environment:
- NEO4J_URI=bolt://neo4j:7687
- NEO4J_USER=${NEO4J_USER:-neo4j}
- NEO4J_PASSWORD=${NEO4J_PASSWORD:-password}
# Tell backend where other services are
- REDIS_HOST=redis
depends_on:
neo4j:
condition: service_healthy
redis:
condition: service_healthy
volumes:
- ./uploads:/app/uploads
- ./backend/static:/app/static
# CRITICAL: Limit memory to prevent system crash
# If app needs more, it will crash container, not Windows
mem_limit: 2g
cpus: 1.5
neo4j:
image: neo4j:latest
container_name: vertical-neo4j
restart: always
ports:
- "7474:7474" # HTTP
- "7687:7687" # Bolt
environment:
- NEO4J_AUTH=${NEO4J_USER:-neo4j}/${NEO4J_PASSWORD:-password}
volumes:
- ./neo4j/data:/data
- ./neo4j/logs:/logs
mem_limit: 1g
healthcheck:
test: [ "CMD-SHELL", "wget --no-verbose --tries=1 --spider localhost:7474 || exit 1" ]
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:alpine
container_name: vertical-redis
restart: always
ports:
- "6379:6379"
mem_limit: 256m
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
interval: 10s
timeout: 5s
retries: 5