Docker 部署方法
参考:https://github.com/mautic/docker-mautic/tree/mautic5/examples
增加插件
使用如下 Dockerfile
FROM mautic/mautic:5-apache
COPY ./plugins/ /var/www/html/docroot/plugins/
结合以下 Makefile
all:
docker build -t mautic/mautic:5-apache-my .
整个目录架构是这样:
root@tencent-gz1:/data/docker/mautic/add-something# tree -L 2 .
.
├── Dockerfile
├── Makefile
├── plugins
│ └── MauticRssToEmailBundle
└── translations
└── zh_CN.zip
执行
增加语言包
在 Dockerfile
增加一个目录:
FROM mautic/mautic:5-apache
COPY ./plugins/ /var/www/html/docroot/plugins/
COPY ./translations/ /var/www/html/docroot/translations/
之后将语言包放入 translations
再构建新镜像即可。
比如下载简体中文类似这样做 :
wget https://language-packs.mautic.com/zh_CN.zip
unzip zh_CN.zip
mv zh_CN ./translations/
常见问题
500
root@tencent-gz1:/data/docker/mautic# docker exec -it basic-mautic_web-1 bash
root@f1088e8096c1:/var/www/html/docroot# cd ..
root@f1088e8096c1:/var/www/html# php bin/console cache:clear
root@7756b780cd1c:/var/www/html# php bin/console cache:clear
// Clearing the cache for the prod environment with debug false
[OK] Cache for the "prod" environment (debug=false) was successfully cleared.