-
Notifications
You must be signed in to change notification settings - Fork 402
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
我启用了镜像,但是无法访问容器 #479
Comments
能附上一些截图吗?你是访问8085端口,页面能访问,但是接口调不通,还是访问8085页面都打不开? 之前有其他人反馈过页面打开了,但是页面提示没有验证码,是数据库配置的问题,需要检查数据库的连接url是否正确 |
您好,页面打不开 [root@localhost ~]# curl http://192.168.16.249:8085 |
如果连页面都打不开的话,跟后端是没关系的,可以尝试一下 |
[root@localhost ~]# docker ps -a | grep xiaoju-survey-app [root@localhost ~]# lsof -i :8085 8085无异常,listen状态 [root@localhost ~]# docker exec -it xiaoju-survey-app bash ps命令没有,所以 ps aux不能用,但是我可以查看nginx.conf的配置 root@6253674e43ef:/xiaoju-survey# cat /etc/nginx/nginx.conf server {
这里看到server是8080端口? root@6253674e43ef:/usr/bin# ip addr 尝试8080端口 500 Internal Server Errornginx/1.22.1 [root@localhost ~]# curl 172.17.0.2:80 |
刚刚看到nginx的配置,由之前的80端口改成8080端口了 你docker的命令改成 之后也不行吗 |
不行 500 Internal Server Error |
应该是 编译的 images 的问题 你试试 “xiaojusurvey/xiaoju-survey:1.3.1-slim” |
果然,github的dockerfile大坑 |
首先说明白 我有有科学的 科学正常 编译正常 没有任何的 问题
的错误 我更换了 xiaojusurvey/xiaoju-survey:1.3.1-slim 这个 images 就没有问题了 我没有测试 xiaojusurvey/xiaoju-survey:1.3.1 这个版本是否有问题 @luch1994 |
大家好
我跟着教程做好了数据库(本地),构建了镜像,运行了容器,日志无错误,但是无法访问容器8085,不知道是哪里不对,有没有大神指导一下?
[root@localhost ~]# docker logs xiaoju-survey-app
nginx start
[Nest] 31 - 02/28/2025, 2:08:47 AM LOG [NestFactory] Starting Nest application...
[Nest] 31 - 02/28/2025, 2:08:47 AM LOG [InstanceLoader] TypeOrmModule dependencies initialized +48ms
[Nest] 31 - 02/28/2025, 2:08:47 AM LOG [InstanceLoader] ConfigHostModule dependencies initialized +0ms
[Nest] 31 - 02/28/2025, 2:08:47 AM LOG [InstanceLoader] ServeStaticModule dependencies initialized +1ms
............
[Nest] 31 - 02/28/2025, 2:08:47 AM LOG [RouterExplorer] Mapped {/api/upgrade/upgradeFeatureStatus, GET} route +1ms
[Nest] 31 - 02/28/2025, 2:08:47 AM LOG [NestApplication] Nest application successfully started +10ms
server is running at: http://127.0.0.1:3000
这是容器启动命令:
docker run -d --name xiaoju-survey-app -p 8085:80 -e XIAOJU_SURVEY_MONGO_URL=mongodb://xiaoju:[email protected]:27017/xiaoju?authSource=xiaoju xiaoju-survey-app
The text was updated successfully, but these errors were encountered: