docker搭建最新的chevereto图床

version: '3'
services:
  chevereto:
    image: ghcr.io/chevereto/chevereto:latest
    container_name: chevereto
    ports:
      - "80:80"
    environment:
      - CHEVERETO_DB_HOST=database
      - CHEVERETO_DB_USER=chevereto
      - CHEVERETO_DB_PASS=user_database_password
      - CHEVERETO_DB_PORT=3306
      - CHEVERETO_DB_NAME=chevereto
      - CHEVERETO_ASSET_STORAGE_TYPE=local
      - CHEVERETO_ASSET_STORAGE_URL=/images/_assets/
      - CHEVERETO_ASSET_STORAGE_BUCKET=/var/www/html/images/_assets/
    volumes:
      - /var/www/html/images/:/var/www/html/images/
    depends_on:
      - database
  database:
    image: mysql:5.7
    container_name: database
    environment:
      - MYSQL_ROOT_PASSWORD=root_password
      - MYSQL_DATABASE=chevereto
      - MYSQL_USER=chevereto
      - MYSQL_PASSWORD=user_database_password
    volumes:
      - ./mysql:/var/lib/mysql

你可能感兴趣的:(docker,数据库,mysql)