misakafa 发表于 2024-3-27 22:59:02

小萝卜 发表于 2024-3-27 22:46
刚刚出门了下,我感觉没有配错呢。

proxy_pass http://127.0.0.1:5678; 应该是这个,不是的话用 ss -ntlp 看下这个程序监听的ip和端口是啥

misakafa 发表于 2024-3-27 23:04:17

小萝卜 发表于 2024-3-27 22:46
刚刚出门了下,我感觉没有配错呢。

哪来的迷之自信,50x就是服务端配置可能有问题

misakafa 发表于 2024-3-27 23:05:55

小萝卜 发表于 2024-3-27 22:52
大佬方便加个联系方式不,虽然还没成功,但我感觉应该快成功了,发个小红包请你喝个奶茶。 ...

可以的啊。论坛pm,hah~

flofire 发表于 2024-3-27 23:12:13

你这docker➕自己装软件的,多数是docker端口映射和内部ip没改对的问题

小萝卜 发表于 2024-3-27 23:25:10

misakafa 发表于 2024-3-27 22:59
proxy_pass http://127.0.0.1:5678; 应该是这个,不是的话用 ss -ntlp 看下这个程序监听的ip和端口是啥 ...

# ss -ntlp
State      Recv-Q Send-QLocal Address:Port               Peer Address:Port            
LISTEN   0      511               *:80                              *:*                   users:(("nginx",pid=15803,fd=43),("nginx",pid=15802,fd=43),("nginx",pid=15801,fd=43),("nginx",pid=15800,fd=43),("nginx",pid=15799,fd=43),("nginx",pid=15798,fd=43),("nginx",pid=15797,fd=43),("nginx",pid=15796,fd=43),("nginx",pid=15795,fd=43))
LISTEN   0      1024                *:6800                            *:*                   users:(("aria2c",pid=1359,fd=6))
LISTEN   0      1024                *:51413                           *:*                   users:(("aria2c",pid=1359,fd=9))
LISTEN   0      9                   *:21                              *:*                   users:(("pure-ftpd",pid=1800,fd=4))
LISTEN   0      511               *:888                           *:*                   users:(("nginx",pid=15803,fd=42),("nginx",pid=15802,fd=42),("nginx",pid=15801,fd=42),("nginx",pid=15800,fd=42),("nginx",pid=15799,fd=42),("nginx",pid=15798,fd=42),("nginx",pid=15797,fd=42),("nginx",pid=15796,fd=42),("nginx",pid=15795,fd=42))
LISTEN   0      200         127.0.0.1:5432                            *:*                   users:(("postgres",pid=17044,fd=7))
LISTEN   0      100         127.0.0.1:25                              *:*                   users:(("master",pid=2416,fd=13))
LISTEN   0      511               *:443                           *:*                   users:(("nginx",pid=15803,fd=44),("nginx",pid=15802,fd=44),("nginx",pid=15801,fd=44),("nginx",pid=15800,fd=44),("nginx",pid=15799,fd=44),("nginx",pid=15798,fd=44),("nginx",pid=15797,fd=44),("nginx",pid=15796,fd=44),("nginx",pid=15795,fd=44))
LISTEN   0      128               *:2874                           *:*                   users:(("sshd",pid=1360,fd=3))
LISTEN   0      5                   *:873                           *:*                   users:(("rsync",pid=1405,fd=4))
LISTEN   0      1024                *:6378                            *:*                   users:(("docker-proxy",pid=30235,fd=4))
LISTEN   0      511         127.0.0.1:6379                            *:*                   users:(("redis-server",pid=2255,fd=6))
LISTEN   0      1024      127.0.0.1:11211                           *:*                   users:(("memcached",pid=1410,fd=26))
LISTEN   0      128               *:7890                            *:*                   users:(("BT-Panel",pid=3136,fd=5))
LISTEN   0      1024             [::]:6800                         [::]:*                   users:(("aria2c",pid=1359,fd=7))
LISTEN   0      1024             [::]:51413                        [::]:*                   users:(("aria2c",pid=1359,fd=10))
LISTEN   0      9                [::]:21                           [::]:*                   users:(("pure-ftpd",pid=1800,fd=5))
LISTEN   0      128            [::]:2874                        [::]:*                   users:(("sshd",pid=1360,fd=4))
LISTEN   0      5                [::]:873                        [::]:*                   users:(("rsync",pid=1405,fd=5))
LISTEN   0      1024             [::]:6378                         [::]:*                   users:(("docker-proxy",pid=30241,fd=4))
LISTEN   0      130            [::]:3306                         [::]:*                   users:(("mysqld",pid=2342,fd=14))


这也没看到chatwoot的端口,咋回事

小萝卜 发表于 2024-3-27 23:54:35

misakafa 发表于 2024-3-27 22:59
proxy_pass http://127.0.0.1:5678; 应该是这个,不是的话用 ss -ntlp 看下这个程序监听的ip和端口是啥 ...

为什么是5678啊大佬,我配置文件里面都是3000,没有5678

小萝卜 发表于 2024-3-28 03:45:15

愁死。折腾三天没折腾好,现在又凌晨了。

找了个替代品supportboard用了,chatwoot是真的复杂,完全弄不好。累,不想折腾了。

感谢misakafa大佬的热心帮助,虽然最后没成功,怪我太菜。

发现supportboard挺好用的,宽慰一点。结帖。

misakafa 发表于 2024-3-28 08:56:24

本帖最后由 misakafa 于 2024-3-28 09:09 编辑

小萝卜 发表于 2024-3-27 23:54
为什么是5678啊大佬,我配置文件里面都是3000,没有5678

你用的是3000就写3000端口
刚刚花了点时间搭建了下,没啥问题,我贴一下代码吧
.env文件
# 用于验证签名cookie的完整性。因此,请确保设置了一个安全值,自己随便修改2个字母!
SECRET_KEY_BASE= wa3iuUPFvwvGVeAtbyDlgodSOMnbWEJ98/LWoLLskgI=

# 替换你运行的域名或者IP地址
FRONTEND_URL= http://127.0.0.1:3000

# Force all access to the app over SSL, default is set to false
FORCE_SSL=false

# 注册选项
# true : 允许注册
# false : 关闭注册
# api_only: 关闭UI上的注册,但可以通过API注册
ENABLE_ACCOUNT_SIGNUP=false

# Redis 配置
REDIS_URL=redis://redis:6379
# 设置REDIS的密码,建议复杂一点
REDIS_PASSWORD=xuu3hfXJY+vtfHjV9fGWkzCYi+dL6Qhr66VJUEcEnV0=

# Postgres Database 配置,密码复杂一点
POSTGRES_HOST=postgres
POSTGRES_USERNAME=postgres
POSTGRES_PASSWORD=b00q4eTJHQmVpXsZ2zlsXGKeWr1mcAJ4mgFpca1LnHE=
RAILS_ENV=development
RAILS_MAX_THREADS=5

# 下面时SMTP配置,可以用来配置邮件通知。具体配置信息建议到你的邮箱服务商那里查看。
# 邮件功能按需配置
MAILER_SENDER_EMAIL=Chatwoot <accounts@chatwoot.com>
SMTP_DOMAIN=chatwoot.com
SMTP_ADDRESS=
SMTP_PORT=
SMTP_USERNAME=
SMTP_PASSWORD=
# plain,login,cram_md5
SMTP_AUTHENTICATION=
SMTP_ENABLE_STARTTLS_AUTO=true
# Can be: 'none', 'peer', 'client_once', 'fail_if_no_peer_cert', see http://api.rubyonrails.org/classes/ActionMailer/Base.html
SMTP_OPENSSL_VERIFY_MODE=peer
# 如果您的SMTP服务器需要,请注释掉以下环境变量。
# SMTP_TLS=
# SMTP_SSL=

# Mail Incoming
# 下面是连续会话使用的邮箱
MAILER_INBOUND_EMAIL_DOMAIN=
# 将此设置为适当的接收渠道,以接收到电子邮件
# 支持的邮箱 :
# relay for Exim, Postfix, Qmail
# mailgun for Mailgun
# mandrill for Mandrill
# postmark for Postmark
# sendgrid for Sendgrid
RAILS_INBOUND_EMAIL_SERVICE=
# 根据电子邮件入口服务,使用以下其中一个
# 参考: https://edgeguides.rubyonrails.org/action_mailbox_basics.html
# 将其设置为您选择的密码,并在入站webhook中使用它
RAILS_INBOUND_EMAIL_PASSWORD=

MAILGUN_INGRESS_SIGNING_KEY=
MANDRILL_INGRESS_API_KEY=

# Creating Your Inbound Webhook Instructions for Postmark and Sendgrid:
# Inbound webhook URL format:
#    https://actionmailbox:@/rails/action_mailbox//inbound_emails
# Note: Replace the values inside the brackets; do not include the brackets themselves.
# Example: https://actionmailbox:mYRandomPassword3@chatwoot.example.com/rails/action_mailbox/postmark/inbound_emails
# For Postmark
# Ensure the 'Include raw email content in JSON payload' checkbox is selected in the inbound webhook section.

# 存储信息的形式,默认本地
ACTIVE_STORAGE_SERVICE=local

# Amazon S3
# 参考文档: https://www.chatwoot.com/docs/configuring-s3-bucket-as-cloud-storage
S3_BUCKET_NAME=
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_REGION=

# 日志设置
RAILS_LOG_TO_STDOUT=true
LOG_LEVEL=info
LOG_SIZE=500

# 省事儿起见,后面夜梦全给他删了。需要的小伙伴可以看官方的文档加上。
==================================================
docker-compose.yml文件
version: '3'

services:
base: &base
    image: chatwoot/chatwoot:latest
    env_file: .env ## 环境变量文件的名字
    volumes:
      - ./data/storage:/app/storage

rails:
    <<: *base
    depends_on:
      - postgres
      - redis
    ports:
      - 5678:3000
    environment:
      - NODE_ENV=production
      - RAILS_ENV=production
      - INSTALLATION_ENV=docker
    entrypoint: docker/entrypoints/rails.sh
    command: ['bundle', 'exec', 'rails', 's', '-p', '3000', '-b', '0.0.0.0']

sidekiq:
    <<: *base
    depends_on:
      - postgres
      - redis
    environment:
      - NODE_ENV=production
      - RAILS_ENV=production
      - INSTALLATION_ENV=docker
    command: ['bundle', 'exec', 'sidekiq', '-C', 'config/sidekiq.yml']

postgres:
    image: postgres:12
    restart: always
    # ports:
    #- 5432:5432
    volumes:
      - ./data/postgres:/var/lib/postgresql/data
    environment:
      - POSTGRES_DB=chatwoot
      - POSTGRES_USER=postgres
      # 环境变量里面设置的密码
      - POSTGRES_PASSWORD=b00q4eTJHQmVpXsZ2zlsXGKeWr1mcAJ4mgFpca1LnHE=

redis:
    image: redis:alpine
    restart: always
    command: ["sh", "-c", "redis-server --requirepass \"$REDIS_PASSWORD\""]
    env_file: .env
    volumes:
      - ./data/redis:/data
    ports:
      - 6378:6379
================================================
在控制台输入以下命令
docker compose run --rm rails bundle exec rails db:chatwoot_prepare

如果没有报错,就继续在控制台执行
docker-compose down
docker-compose up -d
==============================================
nginx配置proxy_pass http://127.0.0.1:5678;

搞完

Jianrry 发表于 2024-3-29 00:05:47

本帖最后由 Jianrry 于 2024-3-29 00:15 编辑

https://picture.atago.moe/file/d46b724eeb7ab0bda1ce3.jpg

https://picture.atago.moe/file/971ea061e59819352df40.jpg

如果你没有放弃 chatwoot ,那么我可以试一下。

你遇到的各种问题,我都遇到过了,明天再一一回复。

小萝卜 发表于 2024-3-29 02:24:29

Jianrry 发表于 2024-3-29 00:05
如果你没有放弃 chatwoot ,那么我可以试一下。

你遇到的各种问题,我都遇到过了,明天再一一回复。


我用supportboard了,不过建议大佬也把遇到问题的解决方法写一下吧,给想要搭建的人一个答案。
页: 1 2 3 4 5 [6] 7
查看完整版本: 有没有大佬教学一下宝塔下chatwoot的安装,送个小红包