services:
  docmost:
    container_name: docmost
    image: docmost/docmost:latest
    depends_on:
      - docmost-db
      - docmost-redis
    environment:
      APP_URL: "https://docmost.akanealw.com"
      APP_SECRET: "7048c87d22461547a1988bc6b2898a8f17f83abd870324cb6a316e0ac2931de6"
      DATABASE_URL: "postgresql://docmost:7048c87d22461547a1988bc6b2898a8f17f83abd870324cb6a316e0ac2931de6@docmost-db:5432/docmost?schema=public"
      REDIS_URL: "redis://docmost-redis:6379"
    networks:
      - docmost
      - reverse-proxy
    ports:
      - 3300:3000
    restart: unless-stopped
    volumes:
      - ./docmost:/app/data/storage

  docmost-db:
    container_name: docmost-db
    image: postgres:16-alpine
    environment:
      POSTGRES_DB: docmost
      POSTGRES_USER: docmost
      POSTGRES_PASSWORD: 7048c87d22461547a1988bc6b2898a8f17f83abd870324cb6a316e0ac2931de6
    networks:
      - docmost
    restart: unless-stopped
    volumes:
      - ./db_data:/var/lib/postgresql/data

  docmost-redis:
    container_name: docmost-redis
    image: redis:7.2-alpine
    networks:
      - docmost
    restart: unless-stopped
    volumes:
      - ./redis_data:/data

networks:
  docmost:
    name: docmost
  reverse-proxy:
    external: true
