Add new chat service docker

This commit is contained in:
jetli 2025-02-20 22:56:28 -08:00
parent f1af132c2a
commit 7976b5b7aa

View File

@ -10,8 +10,52 @@ services:
environment:
- DISABLE_REGISTRATION=true
- REQUIRE_SIGNIN_VIEW=true
volumes: ${WORKING_HOME}/freeleaps2-gitea:/data:Z
networks:
- devbox_freeleaps2-network
chat:
container_name: freeleaps-chat
build:
context: ${WORKING_HOME}/freeleaps/apps
dockerfile: ${WORKING_HOME}/freeleaps/dockers/dev.chat.Dockerfile
args:
CONTAINER_APP_ROOT: app
restart: always
ports:
- 8012:8012
environment:
- CERT_PATH=/app/certs
- EMAIL_FROM=freeleaps@freeleaps.com
- MONGODB_NAME=freeleaps2
- MONGODB_URI=mongodb://freeleaps2-mongodb:27017/
- SITE_URL_ROOT=http://localhost
- JWT_SECRET_KEY=8f87ca8c3c9c3df09a9c78e0adb0927855568f6072d9efc892534aee35f5867b
- JWT_ALGORITHM=HS256
- RABBITMQ_HOST=freeleaps2-rabbitmq
- RABBITMQ_PORT=5672
- LOG_BASE_PATH=/app/log/freeleaps-chat
- BACKEND_LOG_FILE_NAME=freeleaps-chat.log
- APPLICATION_ACTIVITY_LOG=freeleaps-chat.application.log
- FREELEAPS_ENV=dev
- FREELEAPS_CHAT_ENDPOINT=http://freeleaps-alpha.com/api/chat/
- FREELEAPS_DEVSVC_ENDPOINT=http://devsvc:8007/api/devsvc/
- FREELEAPS_CONTENT_ENDPOINT=http://content:8013/api/content/
- FREELEAPS_NOTIFICATION_ENDPOINT=http://notification:8003/api/notification/
- FREELEAPS_CENTRAL_STORAGE_ENDPOINT=http://central_storage:8005/api/central_storage/
- FREELEAPS_AUTHENTICATION_ENDPOINT=http://authentication:8004/api/auth/
- CERT_PATH=/app/certs
- TZ=Asia/Shanghai
command:
# Use a conditional check for RabbitMQ in alpha profile
- /bin/sh
- -c
- |
uvicorn chat.main:app --reload --host=0.0.0.0 --port=8012 --workers 4 --timeout-keep-alive 120 --log-level info
volumes:
- ${WORKING_HOME}/freeleaps2-gitea/:/data
- type: bind
source: ${WORKING_HOME}/freeleaps/apps
target: /app/log/freeleaps-chat
networks:
- devbox_freeleaps2-network