wdssmq / zbp-docker-compose

使用 Docker Compose 快捷部署 Z-BlogPHP + MySQL
4 stars 1 forks source link

tips. 同时部署 flarum #1

Open wdssmq opened 2 years ago

wdssmq commented 2 years ago
    flarum:
        image: mondedie/flarum:stable
        container_name: flarum
        restart: unless-stopped
        ports:
            - 8091:8888
        env_file:
            - ./conf/common.env
            - ./conf/site_flarum.env
        environment:
            - DB_HOST=MySQL
            - DB_USER=root
            - DB_PASS=XXXXXXXXXXXX
            - DB_NAME=docker_flarum
            - DB_PREF=flarum_
            - UPLOAD_MAX_SIZE=4M
        volumes:
            - ./data/www/flarum/assets:/flarum/app/public/assets
            - ./data/www/flarum/extensions:/flarum/app/extensions
            - ./data/www/flarum/storage/logs:/flarum/app/storage/logs
            - ./data/www/flarum/nginx:/etc/nginx/flarum
        depends_on:
            - MySQL
        networks:
            - net_web

site_flarum.env

DEBUG=false
FORUM_URL=http:domain.tld

# User admin flarum (environment variable for first installation)
# /!\ admin password must contain at least 8 characters /!\

FLARUM_ADMIN_USER=admin
FLARUM_ADMIN_PASS=xxxxxxxxxx
FLARUM_ADMIN_MAIL=admin@domain.tld
FLARUM_TITLE=Test flarum
wdssmq commented 1 year ago

安装扩展:

docker exec -ti flarum extension require flarum-lang/chinese-simplified