【问题标题】:How to set up project with docker and deepstream.io?如何使用 docker 和 deepstream.io 设置项目?
【发布时间】:2018-05-08 03:32:32
【问题描述】:

https://github.com/PhillippOhlandt/deepstream-turn-based-game-demo

我克隆了这个 repo 并试图启动并运行它,但我认为我错过了一步。

我在文件夹中运行npm install,并且我还在我的mac 上安装了docker。然后我运行docker-compose up 并启动。当我去本地主机什么都没有发生?

我不认为我完全理解这里发生了什么......

更新

deepstream_1    |       _                     _                              _
deepstream_1    |    __| | ___  ___ _ __  ___| |_ _ __ ___  __ _ _ __ ___   (_) ___
deepstream_1    |   / _` |/ _ \/ _ \ '_ \/ __| __| '__/ _ \/ _` | '_ ` _ \  | |/ _ \
deepstream_1    |  | (_| |  __/  __/ |_) \__ \ |_| | |  __/ (_| | | | | | |_| | (_) |
deepstream_1    |   \__,_|\___|\___| .__/|___/\__|_|  \___|\__,_|_| |_| |_(_)_|\___/
deepstream_1    |                  |_|
deepstream_1    |  =========================   starting   ==========================
deepstream_1    | INFO | logger ready
deepstream_1    | INFO | deepstream version: 2.1.2
deepstream_1    | INFO | configuration file loaded from /etc/deepstream/config.yml
deepstream_1    | INFO | library directory set to: /var/lib/deepstream
deepstream_1    | INFO | messageConnector ready
deepstream_1    | INFO | storage ready
deepstream_1    | INFO | cache ready
deepstream_1    | INFO | authenticationHandler ready: file using /etc/deepstream/users.yml
deepstream_1    | INFO | permissionHandler ready: valve permissions loaded from /etc/deepstream/permissions.yml
deepstream_1    | INFO | Listening for health checks on path /health-check
deepstream_1    | CLUSTER_JOIN | jgx4b6kz-1y8u6be9n0744
deepstream_1    | INFO | Listening for websocket connections on 0.0.0.0:6020/deepstream
deepstream_1    | INFO | Deepstream started
deepstream_1    | INCOMING_CONNECTION | from undefined (172.18.0.3)
deepstream_1    | AUTH_ATTEMPT | 172.18.0.3: AREQ{"username":"backend","password":"password"}
deepstream_1    | AUTH_SUCCESSFUL | backend
gameprovider_1  | LOGIN true { username: 'backend', role: 'backend' }
deepstream_1    | S | for P:get-game-types by backend
deepstream_1    | S | for P:create-game by backend
deepstream_1    | S | for P:join-game by backend
deepstream_1    | S | for P:leave-game by backend
deepstream_1    | S | for P:turn by backend

【问题讨论】:

  • “什么都没有发生”不是有用的错误描述。检查日志,检查容器是否仍在运行,检查进程是否正在监听端口...
  • 我更新了帖子

标签: docker deepstream.io


【解决方案1】:

游戏演示正在运行,但创作者应该添加几行友好的手册。不过,别担心,我会在这里为您介绍。

  1. 运行docker-compose up 后打开浏览器http://localhost:8088/
  2. 输入用户名:userA 密码:password
  3. 创建一个新游戏并记下 GameID
  4. http://localhost:8088/ 打开另一个浏览器选项卡
  5. 输入用户名:userB 密码:password
  6. 通过之前记下的 GameID 加入游戏,您就可以开始玩了。

该游戏最多支持 4 位用户,在作者的辩护中,他们创建了一个 youtube video,但忘记提供一些有用的说明,例如密码是什么。

【讨论】:

  • 你是个很酷的人。你怎么知道去哪个港口是我最大的问题?
  • 啊,没关系,我找到了...我应该在 docker-compose.yml 文件中更仔细地查看
猜你喜欢
  • 2020-02-26
  • 1970-01-01
  • 2016-02-12
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2019-10-05
相关资源
最近更新 更多