我正在尝试在本地机器上使用Docker设置Mura CMS。MYSQL数据库似乎不能正常工作。
我正在使用命令
当我浏览 localhost:8888 时,我看到以下错误信息:
我正在使用命令
docker-compose up
。我一直在尝试以下示例:https://github.com/blueriver/docker-muracms/tree/master/examples/blueriver-muracms-mysql。version: '3.3'
services:
muracms:
image: blueriver/muracms:latest
depends_on:
- svc_muradb
environment:
MURA_ADMIN_USERNAME: admin
MURA_ADMIN_PASSWORD: 5trongP@55w0rd
MURA_ADMINEMAIL: youremail@domain.com
MURA_APPRELOADKEY: appreload
MURA_DATASOURCE: dsn_muracms
MURA_DATABASE: muradb
MURA_DBTYPE: mysql
MURA_DBUSERNAME: root
MURA_DBPASSWORD: 5trongP@55w0rd
MURA_DBHOST: svc_muradb
MURA_DBPORT: 3306
MURA_SITEIDINURLS: "false"
MURA_INDEXFILEINURLS: "true"
MURA_TESTBOX: "true"
MURA_USESSL: "false"
volumes:
- ./www/modules:/var/www/modules
- ./www/plugins:/var/www/plugins
- ./www/sites:/var/www/sites
- ./www/themes:/var/www/themes
ports:
- "8888:8888"
# DB
svc_muradb:
image: mysql:latest
environment:
MYSQL_DATABASE: muradb
MYSQL_ROOT_PASSWORD: 5trongP@55w0rd
volumes:
- vol_muradb:/var/lib/mysql
ports:
- "5001:3306"
# Mounts
volumes:
vol_muradb:
当我浏览 localhost:8888 时,我看到以下错误信息:
500 Error
Could not create connection to database server.
Code:0
Type:database
lucee.runtime.exp.DatabaseException: Could not create connection to database server.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
at com.mysql.jdbc.Util.getInstance(Util.java:408)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:918)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:897)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:886)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:860)
command: ["./wait-for-it.sh", "db:xxx", "--", "catalina.sh", "run"]
。 - atlinedocker inspect blueriver/muracms:latest
命令,在Config
部分找到该镜像的 CMD。 - atline