Open linux998 opened 2 years ago
进到容器里面, 执行下install命令
Describe the bug 描述Bug 使用docker/docker-compose.yml 部署
使用信息:# 默认账号:admin,默认密码:Yearning_admin
To Reproduce 如何复现
使用2.3.5版本中的 docker-compose部署, 方式: 在docker目录下 docker-compose up -d 启动后即可。
确认下是否使用的是docker-compose中的数据库。如不是需要先创建好数据库
进到容器里面, 执行下install命令
我执行install时,提示已经初始化,不能再次初始化。我看了一下db里的yearning库,表是都建了,但是account表里没有记录。我手工加了一条记录之后,登录提示500,后台log报了个错:
yee v0.2.3 [Warn] 2022-05-16 15:14:06 "url":"/login" "method":"POST" "status":500 "protocol":"HTTP/1.1" "remote_ip":"192.168.8.150" "bytes_in": "39 bytes" "bytes_out": "21 bytes"
yee v0.2.3 [Critical] 2022-05-16 15:14:16 (/Users/henryyee/go/pkg/mod/github.com/cookie!y/yee@v0.2.3/middleware/recovery.go:33) [PANIC RECOVER] runtime error: index out of range [2] with length 1 Traceback:
/usr/local/go/src/runtime/panic.go:88
/Users/henryyee/Yearning-go/src/lib/encrypt.go:54
/Users/henryyee/Yearning-go/src/handler/login/login.go:81
/Users/henryyee/go/pkg/mod/github.com/cookie!y/yee@v0.2.3/context.go:106
/Users/henryyee/go/pkg/mod/github.com/cookie!y/yee@v0.2.3/middleware/gzip.go:66
/Users/henryyee/go/pkg/mod/github.com/cookie!y/yee@v0.2.3/context.go:106
/Users/henryyee/go/pkg/mod/github.com/cookie!y/yee@v0.2.3/middleware/recovery.go:38
/Users/henryyee/go/pkg/mod/github.com/cookie!y/yee@v0.2.3/context.go:106
/Users/henryyee/go/pkg/mod/github.com/cookie!y/yee@v0.2.3/middleware/logger.go:57
/Users/henryyee/go/pkg/mod/github.com/cookie!y/yee@v0.2.3/context.go:106
/Users/henryyee/go/pkg/mod/github.com/cookie!y/yee@v0.2.3/middleware/cors.go:96
/Users/henryyee/go/pkg/mod/github.com/cookie!y/yee@v0.2.3/context.go:106
/Users/henryyee/go/pkg/mod/github.com/cookie!y/yee@v0.2.3/yee.go:196
/Users/henryyee/go/pkg/mod/github.com/cookie!y/yee@v0.2.3/yee.go:128
/usr/local/go/src/net/http/server.go:2888
/usr/local/go/src/net/http/server.go:1953
我用的不是demo库,而是连接了外部mysql,看起来执行力schema创建的sql,但是没有初始化数据。
进到容器里面, 执行下install命令
我执行install时,提示已经初始化,不能再次初始化。我看了一下db里的yearning库,表是都建了,但是account表里没有记录。我手工加了一条记录之后,登录提示500,后台log报了个错:
yee v0.2.3 [Warn] 2022-05-16 15:14:06 "url":"/login" "method":"POST" "status":500 "protocol":"HTTP/1.1" "remote_ip":"192.168.8.150" "bytes_in": "39 bytes" "bytes_out": "21 bytes" yee v0.2.3 [Critical] 2022-05-16 15:14:16 (/Users/henryyee/go/pkg/mod/github.com/cookie!y/yee@v0.2.3/middleware/recovery.go:33) [PANIC RECOVER] runtime error: index out of range [2] with length 1 Traceback: /usr/local/go/src/runtime/panic.go:88 /Users/henryyee/Yearning-go/src/lib/encrypt.go:54 /Users/henryyee/Yearning-go/src/handler/login/login.go:81 /Users/henryyee/go/pkg/mod/github.com/cookie!y/yee@v0.2.3/context.go:106 /Users/henryyee/go/pkg/mod/github.com/cookie!y/yee@v0.2.3/middleware/gzip.go:66 /Users/henryyee/go/pkg/mod/github.com/cookie!y/yee@v0.2.3/context.go:106 /Users/henryyee/go/pkg/mod/github.com/cookie!y/yee@v0.2.3/middleware/recovery.go:38 /Users/henryyee/go/pkg/mod/github.com/cookie!y/yee@v0.2.3/context.go:106 /Users/henryyee/go/pkg/mod/github.com/cookie!y/yee@v0.2.3/middleware/logger.go:57 /Users/henryyee/go/pkg/mod/github.com/cookie!y/yee@v0.2.3/context.go:106 /Users/henryyee/go/pkg/mod/github.com/cookie!y/yee@v0.2.3/middleware/cors.go:96 /Users/henryyee/go/pkg/mod/github.com/cookie!y/yee@v0.2.3/context.go:106 /Users/henryyee/go/pkg/mod/github.com/cookie!y/yee@v0.2.3/yee.go:196 /Users/henryyee/go/pkg/mod/github.com/cookie!y/yee@v0.2.3/yee.go:128 /usr/local/go/src/net/http/server.go:2888 /usr/local/go/src/net/http/server.go:1953
我用的不是demo库,而是连接了外部mysql,看起来执行力schema创建的sql,但是没有初始化数据。
ok,已经找到原因了。是因为默认没有执行install的原因。README已经更新,等待合并吧。后面看看有什么好的初始化的办法
进到容器里面, 执行下install命令
我执行install时,提示已经初始化,不能再次初始化。我看了一下db里的yearning库,表是都建了,但是account表里没有记录。我手工加了一条记录之后,登录提示500,后台log报了个错:
yee v0.2.3 [Warn] 2022-05-16 15:14:06 "url":"/login" "method":"POST" "status":500 "protocol":"HTTP/1.1" "remote_ip":"192.168.8.150" "bytes_in": "39 bytes" "bytes_out": "21 bytes" yee v0.2.3 [Critical] 2022-05-16 15:14:16 (/Users/henryyee/go/pkg/mod/github.com/cookie!y/yee@v0.2.3/middleware/recovery.go:33) [PANIC RECOVER] runtime error: index out of range [2] with length 1 Traceback: /usr/local/go/src/runtime/panic.go:88 /Users/henryyee/Yearning-go/src/lib/encrypt.go:54 /Users/henryyee/Yearning-go/src/handler/login/login.go:81 /Users/henryyee/go/pkg/mod/github.com/cookie!y/yee@v0.2.3/context.go:106 /Users/henryyee/go/pkg/mod/github.com/cookie!y/yee@v0.2.3/middleware/gzip.go:66 /Users/henryyee/go/pkg/mod/github.com/cookie!y/yee@v0.2.3/context.go:106 /Users/henryyee/go/pkg/mod/github.com/cookie!y/yee@v0.2.3/middleware/recovery.go:38 /Users/henryyee/go/pkg/mod/github.com/cookie!y/yee@v0.2.3/context.go:106 /Users/henryyee/go/pkg/mod/github.com/cookie!y/yee@v0.2.3/middleware/logger.go:57 /Users/henryyee/go/pkg/mod/github.com/cookie!y/yee@v0.2.3/context.go:106 /Users/henryyee/go/pkg/mod/github.com/cookie!y/yee@v0.2.3/middleware/cors.go:96 /Users/henryyee/go/pkg/mod/github.com/cookie!y/yee@v0.2.3/context.go:106 /Users/henryyee/go/pkg/mod/github.com/cookie!y/yee@v0.2.3/yee.go:196 /Users/henryyee/go/pkg/mod/github.com/cookie!y/yee@v0.2.3/yee.go:128 /usr/local/go/src/net/http/server.go:2888 /usr/local/go/src/net/http/server.go:1953
我用的不是demo库,而是连接了外部mysql,看起来执行力schema创建的sql,但是没有初始化数据。
ok,已经找到原因了。是因为默认没有执行install的原因。README已经更新,等待合并吧。后面看看有什么好的初始化的办法
我删了表,重新执行了install,然而account里虽然有admin数据了,但是登录依然提示密码错误
进到容器里面, 执行下install命令
我执行install时,提示已经初始化,不能再次初始化。我看了一下db里的yearning库,表是都建了,但是account表里没有记录。我手工加了一条记录之后,登录提示500,后台log报了个错:
yee v0.2.3 [Warn] 2022-05-16 15:14:06 "url":"/login" "method":"POST" "status":500 "protocol":"HTTP/1.1" "remote_ip":"192.168.8.150" "bytes_in": "39 bytes" "bytes_out": "21 bytes" yee v0.2.3 [Critical] 2022-05-16 15:14:16 (/Users/henryyee/go/pkg/mod/github.com/cookie!y/yee@v0.2.3/middleware/recovery.go:33) [PANIC RECOVER] runtime error: index out of range [2] with length 1 Traceback: /usr/local/go/src/runtime/panic.go:88 /Users/henryyee/Yearning-go/src/lib/encrypt.go:54 /Users/henryyee/Yearning-go/src/handler/login/login.go:81 /Users/henryyee/go/pkg/mod/github.com/cookie!y/yee@v0.2.3/context.go:106 /Users/henryyee/go/pkg/mod/github.com/cookie!y/yee@v0.2.3/middleware/gzip.go:66 /Users/henryyee/go/pkg/mod/github.com/cookie!y/yee@v0.2.3/context.go:106 /Users/henryyee/go/pkg/mod/github.com/cookie!y/yee@v0.2.3/middleware/recovery.go:38 /Users/henryyee/go/pkg/mod/github.com/cookie!y/yee@v0.2.3/context.go:106 /Users/henryyee/go/pkg/mod/github.com/cookie!y/yee@v0.2.3/middleware/logger.go:57 /Users/henryyee/go/pkg/mod/github.com/cookie!y/yee@v0.2.3/context.go:106 /Users/henryyee/go/pkg/mod/github.com/cookie!y/yee@v0.2.3/middleware/cors.go:96 /Users/henryyee/go/pkg/mod/github.com/cookie!y/yee@v0.2.3/context.go:106 /Users/henryyee/go/pkg/mod/github.com/cookie!y/yee@v0.2.3/yee.go:196 /Users/henryyee/go/pkg/mod/github.com/cookie!y/yee@v0.2.3/yee.go:128 /usr/local/go/src/net/http/server.go:2888 /usr/local/go/src/net/http/server.go:1953
我用的不是demo库,而是连接了外部mysql,看起来执行力schema创建的sql,但是没有初始化数据。
ok,已经找到原因了。是因为默认没有执行install的原因。README已经更新,等待合并吧。后面看看有什么好的初始化的办法
我删了表,重新执行了install,然而account里虽然有admin数据了,但是登录依然提示密码错误
库删掉重建呢?
删掉库之后执行install,提示:mysql连接失败! 亲 数据库建了没? 配置填对了没?
yearning
删掉库之后,再次手动新增库,再执行install,这次可以登录——这个步骤,跟我第一次的操作一模一样呀?
yearning
删掉库之后,再次手动新增库,再执行install,这次可以登录——这个步骤,跟我第一次的操作一模一样呀?
Describe the bug 描述Bug 使用docker/docker-compose.yml 部署
使用信息:# 默认账号:admin,默认密码:Yearning_admin
To Reproduce 如何复现
使用2.3.5版本中的 docker-compose部署, 方式: 在docker目录下 docker-compose up -d 启动后即可。
我也遇到这个问题了,是docker-compose.yml的缩进问题。我重新格式化了文件, 就可以了。
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
Describe the bug Describe the bug Deploy using docker/docker-compose.yml
Usage information: # Default account: admin, default password: Yearning_admin
To Reproduce How to reproduce
Use docker-compose deployment in version 2.3.5. Method: Start docker-compose up -d in the docker directory.
I also encountered this problem, it was the indentation problem of docker-compose.yml. I reformatted the file and it worked. `version: '3'
services: yearning: image: yeelabs/yearning:latest container_name: yearning-web environment: MYSQL_USER: yearning MYSQL_PASSWORD: ukC2ZkcG_ZTeb MYSQL_ADDR: mysql MYSQL_DB: yearning SECRET_KEY: dbcjqheupqjsuwsm IS_DOCKER: is_docker ports:
command: /bin/bash -c "./Yearning install && ./Yearning run" depends_on:
mysql restart: always
mysql: image: mysql:5.7 container_name: yearning-mysql environment: MYSQL_ROOT_PASSWORD: ukC2ZkcG_ZTeb MYSQL_DATABASE: yearning MYSQL_USER: yearning MYSQL_PASSWORD: ukC2ZkcG_ZTeb command:
Describe the bug 描述Bug 使用docker/docker-compose.yml 部署
使用信息:# 默认账号:admin,默认密码:Yearning_admin
To Reproduce 如何复现
使用2.3.5版本中的 docker-compose部署, 方式: 在docker目录下 docker-compose up -d 启动后即可。