云服务器部署 502 Bad Gateway

帮忙看下是什么问题

Nginx日志:
2021/06/24 16:57:06 [error] 55#55: *39 connect() failed (111: Connection refusedd
) while connecting to upstream, client: 58.33.31.89, server: seatable.huaimingxii
ang.site:5080, request: “GET /favicon.ico HTTP/1.1”, upstream: “http://127.0.0.11
:8000/favicon.ico”, host: “seatable.huaimingxiang.site:5080”, referrer: “http:///
seatable.huaimingxiang.site:5080/”

docker-compose.yml文件内容:
seatable:
image: seatable/seatable:latest
container_name: seatable
ports:
- “5080:80”
# - “5443:443” # If https is enabled, cancel the comment.
volumes:
volumes:
- /home/ubuntu/seatable/seatable-data:/shared # Requested, specifies the
path to Seafile data persistent store.
environment:
- DB_HOST=db
- DB_ROOT_PASSWD=PASSWORD # Requested, the value should be root’s passworr
d of MySQL service.
- SEATABLE_SERVER_LETSENCRYPT=False # Default is False. Whether to use lett
's encrypt certificate.
- SEATABLE_SERVER_HOSTNAME=seatable.huaimingxiang.site:5080 # Specifies yoo
ur host name.
- TIME_ZONE=Asia/Shanghai # Optional, default is UTC. Should be uncomment
and set to your local time zone.

502一般是compose打开了,但是没有运行seatable服务导致的。

在yml文件夹下,将两个都跑起来
docker-compose up -d
docker exec -d seatable /shared/seatable/scripts/seatable.sh start

建议在配置完成后,设置开机启动:
编辑文件:
/etc/rc.d/rc.local

添加行:
docker-compose -f /opt/seatable/docker-compose.yml up -d
docker exec -d seatable /shared/seatable/scripts/seatable.sh start

然后赋予执行权限,即可开机自动启动seatable服务。
chmod +x /etc/rc.d/rc.local

2 个赞

我也是,请问用一楼方法解决了吗?我还有问题

建议官方更新一下 开发版的yml文件。
每个服务,加上“restart: always”,那么下次机器重启,服务会自动启动。
例如:
services:
db:
image: mariadb:10.5
container_name: seatable-mysql
restart: always

尝试在yml里加,
‘’‘’
command: sh /shared/seatable/scripts/seatable.sh start
‘’‘’

然后 sudo docker-compose up -d 启动,
然后 sudo docker-compose logs 查看日志,
发现报错:
‘’‘’
seatable | /shared/seatable/scripts/seatable.sh: 3: Syntax error: “(” unexpected
‘’‘’

我试了下 貌似不成啊。
这个容器时启动了,但是容器里面的服务并没有自动起来