Last updated on 2020年7月7日
但是回答的比较简单,对于刚刚入手 docker 的朋友可能不太熟悉
步骤一
修改部分已用中文标注
#以下为 docker-compose.yml 可适当修改其中的配置
version: '2.0'
services:
db:
image: mariadb:10.1
container_name: seafile-mysql
environment:
- MYSQL_ROOT_PASSWORD=db_dev # Requested, set the root's password of MySQL service.
- MYSQL_LOG_CONSOLE=true
volumes:
- /opt/seafile-mysql/db:/var/lib/mysql # Requested, specifies the path to MySQL data persistent store.
networks:
- seafile-net
memcached:
image: memcached:1.5.6
container_name: seafile-memcached
entrypoint: memcached -m 256
networks:
- seafile-net
seafile:
image: seafileltd/seafile-mc:latest
container_name: seafile
ports:
- "8088:8088" # 注意端口在这里更改,如8088(通常只修改宿主机端口号即可如:8088:80)
# - "443:443" # If https is enabled, cancel the comment.
volumes:
- /opt/seafile-data:/shared # Requested, specifies the path to Seafile data persistent store.
- /your/path/seafile.nginx.conf.template:/templates/seafile.nginx.conf.template:ro # 添加这个文件映射(该命令用于修改docker内部端口号,如不需要可以注释)
environment:
- DB_HOST=db
- DB_ROOT_PASSWD=