docker搭建chevereto图床,最方便的是使用docker-compose,搭建步骤如下:

一、安装docker-compose:

git clone https://github.com/docker/compose/releases/download/1.28.2/docker-compose-Linux-x86_64 -O /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
docker-compose --version

二、ssh登录服务器,touch docker-compose.yaml

version: '3'

services:
  db:
    image: mariadb
    volumes:
      - database:/var/lib/mysql:rw
    restart: always
    networks:
      - private
    environment:
      MYSQL_ROOT_PASSWORD: chevereto
      MYSQL_DATABASE: chevereto
      MYSQL_USER: chevereto
      MYSQL_PASSWORD: chevereto

  chevereto:
    depends_on:
      - db
    image: nmtan/chevereto
    restart: always
    networks:
      - private
    environment:
      CHEVERETO_DB_HOST: db
      CHEVERETO_DB_USERNAME: chevereto
      CHEVERETO_DB_PASSWORD: chevereto
      CHEVERETO_DB_NAME: chevereto
      CHEVERETO_DB_PREFIX: che_
    volumes:
      - chevereto-images:/var/www/html/images:rw
      - chevereto-config:/var/www/html:rw
    ports:
      - 9000:80

networks:
  private:
volumes:
  database:
  chevereto-images:
  chevereto-config:

三、在当前目录下执行docker-compose up -d

四、访问ip:9000即可

五、配置去除上传大小限制,打开chevereto-config目录,编辑隐藏文件.htaccess,在最后一行<IfModule>前面添加如下配置:

php_value post_max_size 64M
php_value upload_max_filesize 64M
php_value max_execution_time 100000000
php_value memory_limit 2048M
php_value upload_threads 8

六、可以在后台仪表盘--》设置--〉网站-》图片上传-〉最大上传大小中修改

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注