📄 docker-compose.yaml
/home/palash/git/local-ai/docker-compose.yaml
Language: yaml • Lines: 68
version: '3.8'

services:
  searxng:
    image: searxng/searxng:latest
    container_name: searxng
    restart: unless-stopped
    networks:
      - external-net
      - internal-net
    ports:
      - "8080:8080"
    volumes:
      - ./searxng/settings.yml:/etc/searxng/settings.yml:ro

  # 2. Nextcloud Database
  cloud-db:
    container_name: cloud-db
    image: mariadb:10.11
    restart: always
    command: --transaction-isolation=READ-COMMITTED --log-bin-trust-function-creators=1
    networks:
      - internal-net
    volumes:
      - db_data:/var/lib/mysql
    environment:
      MYSQL_ROOT_PASSWORD: your_root_password
      MYSQL_DATABASE: nextcloud
      MYSQL_USER: nextcloud
      MYSQL_PASSWORD: your_db_password

  # 3. Nextcloud Application
  cloud-app:
    container_name: cloud-app
    image: nextcloud
    restart: always
    # Pin the public hostname to the host so server-side OIDC calls (discovery,
    # logout) hit local nginx directly instead of round-tripping via GCP/DNS.
    extra_hosts:
      - "home.palashkantikundu.in:host-gateway"
    networks:
      - external-net
      - internal-net
    ports:
      - "8082:80"
    depends_on:
      - cloud-db
    volumes:
      - nextcloud_data:/var/www/html
      - /mnt/wwn-0x50014ee2173893e0-part1/BackUp-Copy-2:/mnt/my_backups:ro
    environment:
      MYSQL_HOST: cloud-db
      MYSQL_DATABASE: nextcloud
      MYSQL_USER: nextcloud
      MYSQL_PASSWORD: your_db_password
      # Dynamic Host & Subpath rules
      OVERWRITEPROTOCOL: "https"
      OVERWRITEWEBROOT: "/cloud"

networks:
  external-net:
    driver: bridge
  internal-net:
    driver: bridge

volumes:
  db_data:
  nextcloud_data: