This commit is contained in:
2026-02-03 23:45:27 +08:00
commit 640318cd24
13 changed files with 765 additions and 0 deletions

28
docker-compose.yml Normal file
View File

@@ -0,0 +1,28 @@
services:
app:
build: .
# 生产环境可设置 CHATROOM_IMAGE 从镜像仓库拉取,如: registry.cn-hangzhou.aliyuncs.com/xxx/chatroom:latest
image: ${CHATROOM_IMAGE:-chatroom:latest}
container_name: chatroom-app
labels:
- "com.centurylinklabs.watchtower.enable=true" # Watchtower 监控此容器
ports:
- "2779:2779"
environment:
- RABBITMQ_URL=amqp://guest:guest@rabbitmq:5672/
- PORT=2779
depends_on:
rabbitmq:
condition: service_healthy
rabbitmq:
image: rabbitmq:3-management
container_name: chatroom-rabbitmq
ports:
- "5672:5672"
- "15672:15672"
healthcheck:
test: ["CMD", "rabbitmq-diagnostics", "-q", "check_running"]
interval: 5s
timeout: 15s
retries: 5