seafile-compose.yml

version: '3.0'
services:
  db:
    image: mariadb:10.6
    container_name: seafile-mysql
    environment:
      - MYSQL_ROOT_PASSWORD=password  # Requested, set the root's password of MySQL service.
      - MYSQL_LOG_CONSOLE=true
    volumes:
      - /data/seafile/db:/var/lib/mysql  # Requested, specifies the path to MySQL data persistent store.
    networks:
      - seafile-net

  memcached:
    image: memcached:1.6.18
    container_name: seafile-memcached
    entrypoint: memcached -m 256
    networks:
      - seafile-net

  elasticsearch:
    image: docker.seafile.top/seafileltd/elasticsearch:8.6.2
    container_name: seafile-elasticsearch
    environment:
      - discovery.type=single-node
      - bootstrap.memory_lock=true
      - "ES_JAVA_OPTS=-Xms1g -Xmx1g"
    ulimits:
      memlock:
        soft: -1
        hard: -1
    mem_limit: 2g
    volumes:
      - /data/seafile/elasticsearch:/usr/share/elasticsearch/data
    networks:
      - seafile-net

  seafile:
    image: docker.seafile.top/seafileltd/seafile-pro-mc:11.0-latest
    container_name: seafile
    ports:
      - "8000:80"
    volumes:
      - /data/seafile/data:/shared
      - /data/seafile/deps/seafile-controller:/opt/seafile/seafile-pro-server-11.0.14/seafile/bin/seafile-controller
      - /data/seafile/deps/seaf-server:/opt/seafile/seafile-pro-server-11.0.14/seafile/bin/seaf-server
      - /data/seafile/deps/licenseparse.py:/opt/seafile/seafile-pro-server-11.0.14/seahub/seahub/utils/licenseparse.py
    environment:
      - DB_HOST=db
      - DB_ROOT_PASSWD=password
      - TIME_ZONE=Asia/Shanghai
      - SEAFILE_ADMIN_EMAIL=136xxxxxx771@139.com
      - SEAFILE_ADMIN_PASSWORD=password
      - SEAFILE_SERVER_LETSENCRYPT=false
      - SEAFILE_SERVER_HOSTNAME=yunpan.waringid.me
    depends_on:
      - db
      - memcached
      - elasticsearch
    networks:
      - seafile-net

networks:
  seafile-net:   
chmod -R 777 /data/seafile/elasticsearch
vim /data/seafile/data/seafile/conf/seahub_settings.py

seahub_settings.py

CSRF_TRUSTED_ORIGINS = ["https://yunpan.waringid.me"]


  • 无标签
写评论...