#version: '3.8'

services:
  web:
    build: .
    container_name: fina
    ports:
      - "5103:5103"
    volumes:
      - ./data:/app/data:rw
      - ./uploads:/app/uploads:rw
    environment:
      - FLASK_ENV=production
      - SECRET_KEY=${SECRET_KEY:-change-this-secret-key-in-production}
      - REDIS_URL=redis://redis:6379/0
      - DATABASE_URL=sqlite:////app/data/fina.db
    depends_on:
      - redis
    restart: unless-stopped
    networks:
      - fina-network

  redis:
    image: redis:7-alpine
    container_name: fina-redis
    restart: unless-stopped
    networks:
      - fina-network
    volumes:
      - redis-data:/data

volumes:
  redis-data:

networks:
  fina-network:
    driver: bridge
