使用 Docker 安装 chevereto
安装 Dockers 和 Dockers-Compose
apt install curl python-pip -y
curl -fsSL get.docker.com -o get-docker.sh && sh get-docker.sh
pip install docker-compose
编辑 docker-compose.yml
version: '3'
services:
db:
image: mysql:5.7
container_name: chevereto_db
volumes:
- ./db_data:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: chevereto_root
MYSQL_DATABASE: chevereto
MYSQL_USER: chevereto
MYSQL_PASSWORD: chevereto
chevereto:
depends_on:
- db
image: einverne/chevereto:latest
# build: ./
container_name: chevereto
restart: always
environment:
CHEVERETO_DB_HOST: db:3306
CHEVERETO_DB_USERNAME: chevereto
CHEVERETO_DB_PASSWORD: chevereto
CHEVERETO_DB_NAME: chevereto
CHEVERETO_DB_PREFIX: chv_
volumes:
- ./chevereto:/var/www/html/images
- ./chevereto_content:/var/www/html/content
- ./conf/php.ini:/usr/local/etc/php/conf.d/php.ini
ports:
- 80:80
创建外部目录
mkdir chevereto chevereto_content conf
编辑 conf/php.ini 取消 2M 上传限制
PHP:
max_execution_time = 60;
memory_limit = 256M;
upload_max_filesize = 256M;
post_max_size = 256M;
调整权限
chown -R www-data:www-data chevereto chevereto_content conf
启动
docker-compose up -d