V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
爱意满满的作品展示区。
sunshinev
V2EX  ›  分享创造

蝌蚪聊天室支持 docker 部署了

  •  
  •   sunshinev ·
    sunshinev · 361 天前 · 2954 次点击
    这是一个创建于 361 天前的主题,其中的信息可能已经有所发展或是发生改变。

    https://github.com/sunshinev/go-space-chat

    xx

    特色

    1. 支持性别修改、并且有颜色替换
    2. 支持敏感词过滤
    3. 支持姓名修改

    介绍

    通过 canvas 2d 来模拟了 3D 的视觉效果。

    并且在该项目中使用了 protobuf 来进行前端和后端的通讯协议,这一点非常方便!

    操作

    1. 项目使用传统WASD按键来控制上下左右
    2. 眼睛可以跟随鼠标的位置进行转动
    3. 按下space 空格可以输入消息,按下回车发送消息
    4. 左上角按钮可以输入名称,点击空白处名称生效

    docker (推荐)

    最新支持使用 docker-compose 的方式来启动服务,克隆项目后,直接执行下面命令

    docker-compose up -d
    

    访问http://localhost:8081

    第 1 条附言  ·  361 天前

    ^^

    如果哪位uu有服务器部署的话,可以贴个体验链接

    我是已经没域名和服务器了

    18 条回复    2023-11-28 15:23:19 +08:00
    1044523901
        1
    1044523901  
       361 天前
    不错哈
    huguadao
        2
    huguadao  
       361 天前 via Android
    倒真是有匿名聊天室的需求,不过我自己还没想明白要一个怎么样的
    dianso
        3
    dianso  
       361 天前
    演示没有么
    XanderXu
        4
    XanderXu  
       361 天前
    我用 docker 部署后好像不行,页面无法打开
    PlanV
        5
    PlanV  
       361 天前
    针不错,star 了
    sunshinev
        6
    sunshinev  
    OP
       361 天前
    @dianso 之前有演示,但是涉及到提供聊天能力,所以下线了,你懂得~
    sunshinev
        7
    sunshinev  
    OP
       361 天前
    @PlanV 笔芯
    sunshinev
        8
    sunshinev  
    OP
       361 天前
    @XanderXu 可以贴下控制台报错内容看下,可以看下是否是 amd64 或者 arm64 的问题,我是在 mac 上,用的 golang 的 arm64 版本。如果宿主机是 amd64 的话,可能会拉取 debain 的 amd64 版本
    sunshinev
        9
    sunshinev  
    OP
       361 天前
    @1044523901 笔芯
    Takashi123
        10
    Takashi123  
       361 天前
    直接 go run 是可以启动的,docker 启动就这样了
    Traceback (most recent call last):
    File "/usr/bin/docker-compose", line 11, in <module>
    load_entry_point('docker-compose==1.25.0', 'console_scripts', 'docker-compose')()
    File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 72, in main
    command()
    File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 125, in perform_command
    project = project_from_options('.', options)
    File "/usr/lib/python3/dist-packages/compose/cli/command.py", line 53, in project_from_options
    return get_project(
    File "/usr/lib/python3/dist-packages/compose/cli/command.py", line 151, in get_project
    return Project.from_config(
    File "/usr/lib/python3/dist-packages/compose/project.py", line 102, in from_config
    service_networks = get_networks(service_dict, networks)
    File "/usr/lib/python3/dist-packages/compose/network.py", line 320, in get_networks
    networks[network.true_name] = netdef
    File "/usr/lib/python3/dist-packages/compose/network.py", line 125, in true_name
    self._set_legacy_flag()
    File "/usr/lib/python3/dist-packages/compose/network.py", line 146, in _set_legacy_flag
    data = self.inspect(legacy=True)
    File "/usr/lib/python3/dist-packages/compose/network.py", line 106, in inspect
    return self.client.inspect_network(self.legacy_full_name)
    File "/usr/lib/python3/dist-packages/docker/utils/decorators.py", line 19, in wrapped
    return f(self, resource_id, *args, **kwargs)
    File "/usr/lib/python3/dist-packages/docker/api/network.py", line 212, in inspect_network
    res = self._get(url, params=params)
    File "/usr/lib/python3/dist-packages/docker/utils/decorators.py", line 46, in inner
    return f(self, *args, **kwargs)
    File "/usr/lib/python3/dist-packages/docker/api/client.py", line 230, in _get
    return self.get(url, **self._set_request_timeout(kwargs))
    File "/usr/local/lib/python3.8/dist-packages/requests/sessions.py", line 602, in get
    return self.request("GET", url, **kwargs)
    File "/usr/local/lib/python3.8/dist-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
    File "/usr/local/lib/python3.8/dist-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
    File "/usr/local/lib/python3.8/dist-packages/requests/adapters.py", line 486, in send
    resp = conn.urlopen(
    File "/usr/local/lib/python3.8/dist-packages/urllib3/connectionpool.py", line 791, in urlopen
    response = self._make_request(
    File "/usr/local/lib/python3.8/dist-packages/urllib3/connectionpool.py", line 497, in _make_request
    conn.request(
    TypeError: request() got an unexpected keyword argument 'chunked'
    julyclyde
        11
    julyclyde  
       361 天前
    @Takashi123 这是你 composer 的问题?
    julyclyde
        12
    julyclyde  
       361 天前
    @sunshinev 我看了看你的 composer.yaml 发现带有 build 阶段啊
    这是打算每次下载之后第一次运行都重新 build 一下吗?
    倒是节省了 registry 的存储空间
    sunshinev
        13
    sunshinev  
    OP
       361 天前
    @julyclyde 嘿嘿,为了省事,就每次 clone 下来之后,直接 build 了~
    sunshinev
        14
    sunshinev  
    OP
       361 天前
    XanderXu
        15
    XanderXu  
       361 天前
    @sunshinev 我是 Mac 上运行的
    XanderXu
        16
    XanderXu  
       361 天前
    @sunshinev
    [+] Running 2/2
    ✔ Network go-space-chat_default Created 0.0s
    ✔ Container go-space-chat-my_debian_container-1 Started

    docker logs
    Get:1 http://deb.debian.org/debian bookworm InRelease [151 kB]
    Get:2 http://deb.debian.org/debian bookworm-updates InRelease [52.1 kB]
    Get:3 http://deb.debian.org/debian-security bookworm-security InRelease [48.0 kB]
    Get:4 http://deb.debian.org/debian bookworm/main amd64 Packages [8780 kB]
    Get:5 http://deb.debian.org/debian bookworm-updates/main amd64 Packages [6668 B]
    Get:6 http://deb.debian.org/debian-security bookworm-security/main amd64 Packages [105 kB]
    Fetched 9143 kB in 12s (735 kB/s)
    Reading package lists... Done
    Reading package lists... Done
    Building dependency tree... Done
    Reading state information... Done
    The following additional packages will be installed:
    ca-certificates git-man krb5-locales less libbrotli1 libbsd0 libcbor0.8
    libcurl3-gnutls libedit2 liberror-perl libexpat1 libfido2-1 libgdbm-compat4
    libgdbm6 libgssapi-krb5-2 libk5crypto3 libkeyutils1 libkrb5-3
    libkrb5support0 libldap-2.5-0 libldap-common libnghttp2-14 libperl5.36
    libpsl5 librtmp1 libsasl2-2 libsasl2-modules libsasl2-modules-db libssh2-1
    libssl3 libx11-6 libx11-data libxau6 libxcb1 libxdmcp6 libxext6 libxmuu1
    netbase openssh-client openssl patch perl perl-modules-5.36 publicsuffix
    xauth
    Suggested packages:
    gettext-base git-daemon-run | git-daemon-sysvinit git-doc git-email git-gui
    gitk gitweb git-cvs git-mediawiki git-svn gdbm-l10n krb5-doc krb5-user
    sensible-utils libsasl2-modules-gssapi-mit | libsasl2-modules-gssapi-heimdal
    libsasl2-modules-ldap libsasl2-modules-otp libsasl2-modules-sql keychain
    libpam-ssh monkeysphere ssh-askpass ed diffutils-doc perl-doc
    libterm-readline-gnu-perl | libterm-readline-perl-perl make
    libtap-harness-archive-perl
    The following NEW packages will be installed:
    ca-certificates git git-man krb5-locales less libbrotli1 libbsd0 libcbor0.8
    libcurl3-gnutls libedit2 liberror-perl libexpat1 libfido2-1 libgdbm-compat4
    libgdbm6 libgssapi-krb5-2 libk5crypto3 libkeyutils1 libkrb5-3
    libkrb5support0 libldap-2.5-0 libldap-common libnghttp2-14 libperl5.36
    libpsl5 librtmp1 libsasl2-2 libsasl2-modules libsasl2-modules-db libssh2-1
    libssl3 libx11-6 libx11-data libxau6 libxcb1 libxdmcp6 libxext6 libxmuu1
    netbase openssh-client openssl patch perl perl-modules-5.36 publicsuffix
    wget xauth
    0 upgraded, 47 newly installed, 0 to remove and 0 not upgraded.
    Need to get 26.4 MB of archives.
    After this operation, 127 MB of additional disk space will be used.
    Get:1 http://deb.debian.org/debian bookworm/main amd64 perl-modules-5.36 all 5.36.0-7 [2815 kB]
    Get:2 http://deb.debian.org/debian bookworm/main amd64 libgdbm6 amd64 1.23-3 [72.2 kB]
    Get:3 http://deb.debian.org/debian bookworm/main amd64 libgdbm-compat4 amd64 1.23-3 [48.2 kB]
    Get:4 http://deb.debian.org/debian bookworm/main amd64 libperl5.36 amd64 5.36.0-7 [4218 kB]
    Get:5 http://deb.debian.org/debian bookworm/main amd64 perl amd64 5.36.0-7 [239 kB]
    Get:6 http://deb.debian.org/debian bookworm/main amd64 less amd64 590-2 [131 kB]
    Get:7 http://deb.debian.org/debian bookworm/main amd64 netbase all 6.4 [12.8 kB]
    Get:8 http://deb.debian.org/debian-security bookworm-security/main amd64 libssl3 amd64 3.0.11-1~deb12u2 [2019 kB]
    Get:9 http://deb.debian.org/debian-security bookworm-security/main amd64 openssl amd64 3.0.11-1~deb12u2 [1419 kB]
    Get:10 http://deb.debian.org/debian bookworm/main amd64 ca-certificates all 20230311 [153 kB]
    Get:11 http://deb.debian.org/debian bookworm/main amd64 krb5-locales all 1.20.1-2+deb12u1 [62.7 kB]
    Get:12 http://deb.debian.org/debian bookworm/main amd64 libbsd0 amd64 0.11.7-2 [117 kB]
    Get:13 http://deb.debian.org/debian bookworm/main amd64 libedit2 amd64 3.1-20221030-2 [93.0 kB]
    Get:14 http://deb.debian.org/debian bookworm/main amd64 libcbor0.8 amd64 0.8.0-2+b1 [27.4 kB]
    Get:15 http://deb.debian.org/debian bookworm/main amd64 libfido2-1 amd64 1.12.0-2+b1 [77.2 kB]
    Get:16 http://deb.debian.org/debian bookworm/main amd64 libkrb5support0 amd64 1.20.1-2+deb12u1 [32.4 kB]
    Get:17 http://deb.debian.org/debian bookworm/main amd64 libk5crypto3 amd64 1.20.1-2+deb12u1 [78.9 kB]
    Get:18 http://deb.debian.org/debian bookworm/main amd64 libkeyutils1 amd64 1.6.3-2 [8808 B]
    Get:19 http://deb.debian.org/debian bookworm/main amd64 libkrb5-3 amd64 1.20.1-2+deb12u1 [332 kB]
    Get:20 http://deb.debian.org/debian bookworm/main amd64 libgssapi-krb5-2 amd64 1.20.1-2+deb12u1 [134 kB]
    Get:21 http://deb.debian.org/debian bookworm/main amd64 openssh-client amd64 1:9.2p1-2+deb12u1 [989 kB]
    Get:22 http://deb.debian.org/debian bookworm/main amd64 libpsl5 amd64 0.21.2-1 [58.7 kB]
    Get:23 http://deb.debian.org/debian bookworm/main amd64 wget amd64 1.21.3-1+b2 [984 kB]
    Get:24 http://deb.debian.org/debian bookworm/main amd64 libbrotli1 amd64 1.0.9-2+b6 [275 kB]
    Get:25 http://deb.debian.org/debian bookworm/main amd64 libsasl2-modules-db amd64 2.1.28+dfsg-10 [20.3 kB]
    Get:26 http://deb.debian.org/debian bookworm/main amd64 libsasl2-2 amd64 2.1.28+dfsg-10 [59.7 kB]
    Get:27 http://deb.debian.org/debian bookworm/main amd64 libldap-2.5-0 amd64 2.5.13+dfsg-5 [183 kB]
    Get:28 http://deb.debian.org/debian bookworm/main amd64 libnghttp2-14 amd64 1.52.0-1 [72.3 kB]
    Get:29 http://deb.debian.org/debian bookworm/main amd64 librtmp1 amd64 2.4+20151223.gitfa8646d.1-2+b2 [60.8 kB]
    Get:30 http://deb.debian.org/debian bookworm/main amd64 libssh2-1 amd64 1.10.0-3+b1 [179 kB]
    Get:31 http://deb.debian.org/debian-security bookworm-security/main amd64 libcurl3-gnutls amd64 7.88.1-10+deb12u4 [385 kB]
    Get:32 http://deb.debian.org/debian bookworm/main amd64 libexpat1 amd64 2.5.0-1 [99.3 kB]
    Get:33 http://deb.debian.org/debian bookworm/main amd64 liberror-perl all 0.17029-2 [29.0 kB]
    Get:34 http://deb.debian.org/debian bookworm/main amd64 git-man all 1:2.39.2-1.1 [2049 kB]
    Takashi123
        17
    Takashi123  
       361 天前
    @julyclyde #11 我 check 一下
    julyclyde
        18
    julyclyde  
       361 天前
    @Takashi123 composer 古代版本是 python 的。后来改成 golang 的了。再然后变成 docker 命令的 plugin 了
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2946 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 08:14 · PVG 16:14 · LAX 00:14 · JFK 03:14
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.