Closed n3A87 closed 2 weeks ago
本地docker容器:
请提供docker日志的错误日志
请提供docker日志的错误日志
请问需要查看哪个容器的日志?
maxKey日志如下:
猜测是没连接上mysql,我应该在哪个地方配置?
按照官方文档进行 docker-compose 部署时,仓库中的yml文件内容配置有误,需要修改docker-compose.yml
文件内容如下:
version: '3'
networks:
maxkey.top:
driver: bridge
services:
mysql:
image: mysql:8.0.32
container_name: maxkey-mysql
hostname: maxkey-mysql
volumes:
- ./docker-mysql/data:/var/lib/mysql
- ./docker-mysql/logs:/var/log/mysql
- ./docker-mysql/conf.d:/etc/mysql/conf.d
- ./docker-mysql/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
environment:
- MYSQL_ROOT_PASSWORD=maxkey
ports:
- "3306:3306"
restart: always
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
networks:
- maxkey.top
maxkey-frontend:
image: maxkeytop/maxkey-frontend:latest
container_name: maxkey-frontend
hostname: maxkey-frontend
environment:
- TZ=Asia/Shanghai
ports:
- "8527:8527"
networks:
- maxkey.top
maxkey:
image: maxkeytop/maxkey:latest
container_name: maxkey
hostname: maxkey
environment:
- DATABASE_HOST=maxkey-mysql
- DATABASE_PORT=3306
- DATABASE_NAME=maxkey
- DATABASE_USER=root
- DATABASE_PWD=maxkey
ports:
- "9527:9527"
networks:
- maxkey.top
depends_on:
- mysql
maxkey-mgt:
image: maxkeytop/maxkey-mgt:latest
container_name: maxkey-mgt
hostname: maxkey-mgt
environment:
- DATABASE_HOST=maxkey-mysql
- DATABASE_PORT=3306
- DATABASE_NAME=maxkey
- DATABASE_USER=root
- DATABASE_PWD=maxkey
ports:
- "9526:9526"
networks:
- maxkey.top
depends_on:
- mysql
maxkey-mgt-frontend:
image: maxkeytop/maxkey-mgt-frontend:latest
container_name: maxkey-mgt-frontend
hostname: maxkey-mgt-frontend
environment:
- TZ=Asia/Shanghai
ports:
- "8526:8526"
networks:
- maxkey.top
maxkey-nginx:
image: nginx:latest
container_name: maxkey-nginx
hostname: maxkey-nginx
volumes:
- ./docker-nginx:/etc/nginx/conf.d
ports:
- "8012:80"
networks:
- maxkey.top
depends_on:
- maxkey-frontend
- maxkey-mgt-frontend
- maxkey
- maxkey-mgt
增加对应的 depends_on 配置,然后访问:
http://localhost:8012/maxkey-mgt/
http://localhost:8012/maxkey/
请提供docker日志的错误日志
请问需要查看哪个容器的日志?
maxKey日志如下:
猜测是没连接上mysql,我应该在哪个地方配置?
我刚开始也遇到了这个问题,后来自己摸索出来发现是仓库中的yml配置有点问题,在自己本地docker环境hostname并未生效,按照上面我发的配置修改后就可以了。
请加官方qq协助解决,发issue编号
我已按照这个文档,在本地docker上部署完成,接下来该如何做呢?
我点击http://sso.maxkey.top/maxkey/后,出现这样的报错提示,请问是什么原因?