Skip to content
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

Docker 编译运行 404 #2

Closed
superxxl opened this issue Apr 23, 2020 · 2 comments
Closed

Docker 编译运行 404 #2

superxxl opened this issue Apr 23, 2020 · 2 comments

Comments

@superxxl
Copy link

执行步骤
1.clone 项目
2.修改config.json
3.修改docker-compose.yaml挂载配置文件
4.编译
5.查看日志,显示debug模式,配置文件导入成功
6.浏览器访问:显示404 page not found

@superxxl superxxl reopened this Apr 24, 2020
@zhangguanzhang
Copy link
Member

[root@k8s-m1 gonelist]# cat config/config.json 
{
  "client_id": "e3fa9e12-b*************",
  "redirect_url": "https://xxxxxx.zhangguanzhang.com/auth",
  "client_secret": "b7E[yK**********************",
  "state": "23333",
  "server": {
    "port": 8000,
    "refresh_time": 10,
    "bind_global": true,
    "dist_path":"/etc/dist/",
    "folder_sub": "/"
  }
}
[root@k8s-m1 gonelist]# cat docker-compose.yml 
version: '3.4'
services:
  nginx:
    image: zhangguanzhang/gonelist:v0.3
    container_name: gonelist
    hostname: gonelist
    volumes:
      - /usr/share/zoneinfo/Asia/Shanghai:/etc/localtime:ro
      - ./config/:/etc/config/ #建议把配置文件放当前路径的config下面,不然挂载的是inode
    command:
      - '--conf=/etc/config/config.json'
    #network_mode: "host"
    ports:
      - 8081:8000
    logging:
      driver: json-file
      options:
        max-file: '3'
        max-size: 100m
[root@k8s-m1 gonelist]# 

@zhangguanzhang
Copy link
Member

 "dist_path":"/etc/dist/",

zhangguanzhang added a commit that referenced this issue May 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants