系统环境

rockylinux9.4
offset selinux
dnf update

部署docker

见链接:https://www.liuguohua.com/3125.html

预拉取seafile镜像

docker pull seafileltd/seafile-pro-mc:11.0-latest

建立相关目录

mkdir /opt/seafile
cd /opt/seafile

建立配置文件docker-compose.yml

# more docker-compose.yml 
services:
db:
image: mariadb:10.11
container_name: seafile-mysql
environment:
- MYSQL_ROOT_PASSWORD=Zhongguo@0755 # Requested, set the root's password of MySQL service.
- MYSQL_LOG_CONSOLE=true
- MARIADB_AUTO_UPGRADE=1
volumes:
- /opt/seafile-mysql/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

seafile:
image: seafileltd/seafile-pro-mc:11.0-latest
container_name: seafile
ports:
- "80:80"
# - "443:443" # If https is enabled, cancel the comment.
volumes:
- /opt/seafile-data:/shared # Requested, specifies the path to Seafile data persistent store.
environment:
- DB_HOST=db
- DB_ROOT_PASSWD=Zhongguo@0755 # Requested, the value shuold be root's password of MySQL service.
- TIME_ZONE=Asia/Shanghai # Optional, default is UTC. Should be uncomment and set to your local time zone.
- SEAFILE_ADMIN_EMAIL=admin@liuguohua.com # Specifies Seafile admin user, default is 'me@example.com'.
- SEAFILE_ADMIN_PASSWORD=Zhongguo@0755 # Specifies Seafile admin password, default is 'asecret'.
- SEAFILE_SERVER_LETSENCRYPT=false # Whether use letsencrypt to generate cert.
- SEAFILE_SERVER_HOSTNAME=seafile.liuguohua.com # Specifies your host name.
depends_on:
- db
- memcached
networks:
- seafile-net

networks:
seafile-net:

启动seafile容器

docker compose up -d

查看容器运行情况

docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
7d2cf084adc2 seafileltd/seafile-pro-mc:11.0-latest "/sbin/my_init -- /s…" 10 minutes ago Up 10 minutes 0.0.0.0:80->80/tcp, [::]:80->80/tcp seafile
29c7314bf575 mariadb:10.11 "docker-entrypoint.s…" 10 minutes ago Up 10 minutes 3306/tcp seafile-mysql
ad2563e67deb memcached:1.6.18 "memcached -m 256" 10 minutes ago Up 10 minutes 11211/tcp seafile-memcached

浏览器访问

seafile.liuguohua.com
或机器的IP地址
帐户密码见docker-compose.yml中配置参数SEAFILE_ADMIN_EMAIL和SEAFILE_ADMIN_PASSWORD

重装seafile pro 11

如果docker-compose.yml配置文件定义错误,需要重新安装seafile,可执行以下步骤:

一、修正docker-compose.yml配置文件

二、删除正在运行的docker容器

docker rm -f $(docker ps -aq)

三、删除持久化目录

rm -rf seafile-data/
rm -rf seafile-mysql/

 

 

声明:欢迎大家光临本站,学习IT运维技术,转载本站内容,请注明内容出处”来源刘国华教育“。如若本站内容侵犯了原著者的合法权益,请联系我们进行处理。