version: "3.8"
services:
  typecho:
    image: 80x86/typecho:latest
    restart: unless-stopped
    environment:
      PHP_TZ: Asia/Shanghai
      PHP_MAX_EXECUTION_TIME: 600
    volumes:
      - typecho_data:/data
    depends_on:
      - db

  db:
    image: mysql:5.7
    restart: unless-stopped
    environment:
      MYSQL_DATABASE: typecho
      MYSQL_USER: typecho
      MYSQL_PASSWORD: typecho_password
      MYSQL_ROOT_PASSWORD: root_password
    volumes:
      - db_data:/var/lib/mysql

volumes:
  typecho_data:
  db_data: