filerun试用小记
nextcloud实在是太占用资源了放谷一搜,不少推荐filerun的,就试用一下如果centos7换掉的时候可以找一个一揽子解决方案,我现在用的vsftp+nginx+sambadocker :: FileRun Documentation,这里写得差不多了,docker-compose用起来超爽,因为有配置文件了,一个命令全搞定,就是这么简单!!docker-compose可以用sudo ap
nextcloud实在是太占用资源了
放谷一搜,不少推荐filerun的,就试用一下
想着centos7换掉的时候可以找一个一揽子解决方案,我现在用的vsftp+nginx+samba
docker :: FileRun Documentation,这里写得差不多了,
docker-compose用起来超爽,因为有配置文件了,一个命令全搞定,就是这么简单!!
docker-compose可以用sudo apt install docker-compose安装,不用非得下载安装包
配置文件可以根据需要修改:
debian@debian:~/filerun$ cat docker-compose.yml
version: '2'
services:
db:
image: mariadb:10.1
environment:
MYSQL_ROOT_PASSWORD: your_mysql_root_password
MYSQL_USER: your_filerun_username
MYSQL_PASSWORD: your_filerun_password
MYSQL_DATABASE: your_filerun_database
volumes:
- /home/debian/filerun/db:/var/lib/mysql
web:
image: filerun/filerun
environment:
FR_DB_HOST: db
FR_DB_PORT: 3306
FR_DB_NAME: your_filerun_database
FR_DB_USER: your_filerun_username
FR_DB_PASS: your_filerun_password
APACHE_RUN_USER: www-data
APACHE_RUN_USER_ID: 33
APACHE_RUN_GROUP: www-data
APACHE_RUN_GROUP_ID: 33
depends_on:
- db
links:
- db:db
ports:
- "8000:80"
volumes:
- /home/debian/filerun/var/www/html:/var/www/html
- /home/debian/filerun/user-files:/user-files
- /home/debian/test:/home/debian/test
filerun文件目录软链接外部目录的话,直接添加docker目录映射+修改目录权限777(或own)就可以了,不用专门修改配置文件
cd filerundir
sudo docker-compose up -d
就可以启动服务了,是不是很快
还有其它一些命令
docker-compose stop
docker-compose start
#重新构建,也就是拉取最新的
docker-compose up -d --build
filerun有一个很方便的特性,两个用户可以设定同一个目录,这个可以一个用户读写权限,另一个用户只读权限,深合我意~~
补充:
网页上显示的时间差8小时,修改var/www/html/customizables/config.php
[root@localhost customizables]# cat config.php
<?php
date_default_timezone_set("Asia/Shanghai");
日志时间也不对,修改cat docker-compose.yml
db:
image: mariadb:10.1
restart: always
environment:
TZ: 'Asia/Shanghai'
添加上随docker自启动,最终配置文件docker-compose.yml
version: '2'
services:
db:
image: mariadb:10.1
restart: always
environment:
TZ: 'Asia/Shanghai'
MYSQL_ROOT_PASSWORD: your_mysql_root_password
MYSQL_USER: your_filerun_username
MYSQL_PASSWORD: your_filerun_password
MYSQL_DATABASE: your_filerun_database
volumes:
- /root/filerun/db:/var/lib/mysql
web:
image: filerun/filerun
restart: always
environment:
FR_DB_HOST: db
FR_DB_PORT: 3306
FR_DB_NAME: your_filerun_database
FR_DB_USER: your_filerun_username
FR_DB_PASS: your_filerun_password
APACHE_RUN_USER: www-data
APACHE_RUN_USER_ID: 33
APACHE_RUN_GROUP: www-data
APACHE_RUN_GROUP_ID: 33
depends_on:
- db
links:
- db:db
ports:
- "8000:80"
volumes:
- /root/filerun/var/www/html:/var/www/html
- /root/filerun/user-files:/user-files
- /var/vsftpd:/var/vsftpd
更多推荐
所有评论(0)