Homeland 如何修改 Homeland 的默认端口?或如何用 Nginx 做 Homeland 的代理?

w821881341 · November 24, 2017 · Last by aldrich replied at November 30, 2017 · 2311 hits

最近用官方推荐的 docker 方式安装了 homeland,但安装后只能绑定 80 端口,想换到其他端口,然后用 nginx 代理转发域名~求教

本来已经有 Nginx 了

Reply to huacnlee

那怎么修改端口呢

Reply to w821881341

改下 docker 的启动端口也行

docker-compose.yml

自行学习

Reply to huacnlee

大佬。请问我在本地模仿生产环境 (nginx , puma , sidkiq,elasticsearch 神马的都启了),然后测试的时候,搜索功能搜不到帖子。我用 docker build 完镜像后,本地跑起来就可以搜。不知道为啥。。。。

Reply to w821881341

修改 docker-compose.yml

web:
    container_name: 'homeland_web'
    image: homeland/homeland:3.0.10
    links:
      - app
      - app_backup
      - worker
    env_file:
      - app.default.env
      - app.local.env
      - app.secret.env
    command: nginx -c /etc/nginx/nginx.conf
    volumes_from:
      - app
    ports:
      - "80:80" 
      - "443:443"



ports:
 -"81:80"
 -"445:443"
You need to Sign in before reply, if you don't have an account, please Sign up first.