Chevereto Docker版安装

1. 下载地址

DockerHub仓库 我使用的是nmtan的镜像
作者Github 地址

2. 安装Docker

因为本次使用Docker安装Chevereto,所以首先安装Docker

  1. 常用软件安装
apt-get update && apt-get install -y wget vim
  1. 安装Docker
wget -qO- get.docker.com | bash
  1. 查看版本
docker -v
  1. 设置开机自动启动
systemctl enable docker
  1. 安装docker-compose
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

sudo chmod +x /usr/local/bin/docker-compose

docker-compose --version

3. 安装Chevereto

  1. 创建目录
mkdir -p /root/data/docker_data/chevereto
cd /root/data/docker_data/chevereto
  1. 创建docker容器
version: '3'

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

  chevereto:
    depends_on:
      - db
    image: einverne/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: chv_
    volumes:
      - /home/暂存/docker/chevereto:/var/www/html/images:rw
    ports:
      - 8002:80

networks:
  private:
volumes:
  database:
  chevereto_images: