services:
  docmost:
    image: docmost/docmost:latest
    depends_on:
      - db
      - redis
    environment:
      APP_URL: 'http://localhost:3000'
      APP_SECRET: 'TW3kJS74HMdwq8Vlq8L5ZRCIZxtO4R'
      DATABASE_URL: 'postgresql://docmost:[password]@db:5432/docmost?schema=public'
      REDIS_URL: 'redis://redis:6379'
      FILE_UPLOAD_SIZE_LIMIT: '500mb'
    ports:
      - "3000:3000"
    restart: unless-stopped
    volumes:
      - /volume1/docker/docmost/data:/app/data/storage

  db:
    image: postgres:16-alpine
    environment:
      POSTGRES_DB: docmost
      POSTGRES_USER: docmost
      POSTGRES_PASSWORD: [password]
    restart: unless-stopped
    volumes:
      - /volume1/docker/docmost/db_data:/var/lib/postgresql/data

  redis:
    image: redis:7.2-alpine
    restart: unless-stopped
    volumes:
      - /volume1/docker/docmost/redis_data:/data