项目重构
This commit is contained in:
28
0-部署应用/Oracle-Cloud/tailchat聊天/docker-compose.env
Normal file
28
0-部署应用/Oracle-Cloud/tailchat聊天/docker-compose.env
Normal file
@@ -0,0 +1,28 @@
|
||||
LOGGER=true
|
||||
LOGLEVEL=info
|
||||
SERVICEDIR=services
|
||||
|
||||
TRANSPORTER=redis://redis:6379
|
||||
|
||||
REDIS_URL=redis://redis:6379
|
||||
MONGO_URL=mongodb://mongo/tailchat
|
||||
SECRET=lovemm.23
|
||||
|
||||
# file
|
||||
API_URL=https://chat.107421.xyz
|
||||
|
||||
# minio
|
||||
MINIO_URL=minio:9000
|
||||
MINIO_USER=tailchat
|
||||
MINIO_PASS=com.msgbyte.tailchat
|
||||
|
||||
# SMTP
|
||||
SMTP_SENDER=
|
||||
SMTP_URI=
|
||||
|
||||
# metrics
|
||||
PROMETHEUS=1
|
||||
|
||||
# Admin
|
||||
ADMIN_USER=zeaslity
|
||||
ADMIN_PASS=lovemm.23
|
||||
116
0-部署应用/Oracle-Cloud/tailchat聊天/tailchat-docker-compose.yaml
Normal file
116
0-部署应用/Oracle-Cloud/tailchat聊天/tailchat-docker-compose.yaml
Normal file
@@ -0,0 +1,116 @@
|
||||
version: "3.3"
|
||||
|
||||
services:
|
||||
# Tailchat Core Services
|
||||
service-core:
|
||||
build:
|
||||
context: .
|
||||
image: tailchat-0818
|
||||
restart: unless-stopped
|
||||
env_file: docker-compose.env
|
||||
environment:
|
||||
SERVICES: core/gateway,core/user/*.service.js,core/group/*.service.js,core/chat/*.service.js,core/file,core/plugin/registry,core/config
|
||||
PORT: 3000
|
||||
depends_on:
|
||||
- mongo
|
||||
- redis
|
||||
- minio
|
||||
ports:
|
||||
- "3001:3000"
|
||||
# labels:
|
||||
# - "traefik.enable=true"
|
||||
# - "traefik.http.routers.api-gw.rule=PathPrefix(`/`)"
|
||||
# - "traefik.http.services.api-gw.loadbalancer.server.port=3000"
|
||||
networks:
|
||||
- internal
|
||||
|
||||
# Open Platform
|
||||
service-openapi:
|
||||
build:
|
||||
context: .
|
||||
image: tailchat-0818
|
||||
restart: unless-stopped
|
||||
env_file: docker-compose.env
|
||||
environment:
|
||||
SERVICES: openapi/app,openapi/bot,openapi/integration,openapi/oidc/oidc
|
||||
OPENAPI_PORT: 3003
|
||||
OPENAPI_UNDER_PROXY: "true"
|
||||
depends_on:
|
||||
- mongo
|
||||
- redis
|
||||
- minio
|
||||
ports:
|
||||
- "3003:3003"
|
||||
# labels:
|
||||
# - "traefik.enable=true"
|
||||
# - "traefik.http.routers.openapi-oidc.rule=PathPrefix(`/open`)"
|
||||
# - "traefik.http.services.openapi-oidc.loadbalancer.server.port=3003"
|
||||
networks:
|
||||
- internal
|
||||
|
||||
# Plugin Service (All Plugins)
|
||||
service-all-plugins:
|
||||
build:
|
||||
context: .
|
||||
image: tailchat-0818
|
||||
restart: unless-stopped
|
||||
env_file: docker-compose.env
|
||||
environment:
|
||||
SERVICEDIR: plugins
|
||||
depends_on:
|
||||
- mongo
|
||||
- redis
|
||||
- minio
|
||||
networks:
|
||||
- internal
|
||||
|
||||
# Database
|
||||
mongo:
|
||||
image: mongo:4
|
||||
restart: on-failure
|
||||
volumes:
|
||||
- /data/tailchat/mongo_data:/data/db
|
||||
networks:
|
||||
- internal
|
||||
|
||||
# Data cache and Transporter
|
||||
redis:
|
||||
image: redis:alpine
|
||||
restart: on-failure
|
||||
networks:
|
||||
- internal
|
||||
|
||||
# Persist Storage
|
||||
minio:
|
||||
image: minio/minio
|
||||
restart: on-failure
|
||||
networks:
|
||||
- internal
|
||||
environment:
|
||||
MINIO_ROOT_USER: tailchat
|
||||
MINIO_ROOT_PASSWORD: com.msgbyte.tailchat
|
||||
volumes:
|
||||
- /data/tailchat/minio_storage:/data
|
||||
command: minio server /data --console-address ":9001"
|
||||
|
||||
# Router
|
||||
# traefik:
|
||||
# image: traefik:v2.1
|
||||
# restart: unless-stopped
|
||||
# command:
|
||||
# - "--api.insecure=true" # Don't do that in production!
|
||||
# - "--providers.docker=true"
|
||||
# - "--providers.docker.exposedbydefault=false"
|
||||
# - "--entryPoints.web.address=:80"
|
||||
# - "--entryPoints.web.forwardedHeaders.insecure" # Not good
|
||||
# ports:
|
||||
# - 11000:80
|
||||
# - 127.0.0.1:11001:8080
|
||||
# volumes:
|
||||
# - /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
# networks:
|
||||
# - internal
|
||||
# - default
|
||||
|
||||
networks:
|
||||
internal:
|
||||
66
0-部署应用/Oracle-Cloud/tailchat聊天/tailchat-反向代理.conf
Normal file
66
0-部署应用/Oracle-Cloud/tailchat聊天/tailchat-反向代理.conf
Normal file
@@ -0,0 +1,66 @@
|
||||
server {
|
||||
server_name chat.107421.xyz;
|
||||
listen 80;
|
||||
return 301 https://chat.107421.xyz$request_uri;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl;
|
||||
server_name chat.107421.xyz;
|
||||
|
||||
ssl_certificate /etc/nginx/conf.d/ssl_key/chat.107421.xyz.cert.pem;
|
||||
ssl_certificate_key /etc/nginx/conf.d/ssl_key/chat.107421.xyz.key.pem;
|
||||
ssl_session_timeout 1d;
|
||||
ssl_session_cache shared:MozSSL:10m;
|
||||
ssl_session_tickets off;
|
||||
|
||||
ssl_protocols TLSv1.2 TLSv1.3;
|
||||
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
|
||||
ssl_prefer_server_ciphers off;
|
||||
|
||||
|
||||
location /open {
|
||||
access_log /var/log/nginx/access.log main;
|
||||
client_max_body_size 5120m;
|
||||
client_body_buffer_size 5120m;
|
||||
client_body_timeout 6000s;
|
||||
proxy_send_timeout 10000s;
|
||||
proxy_read_timeout 10000s;
|
||||
proxy_connect_timeout 600s;
|
||||
proxy_max_temp_file_size 5120m;
|
||||
proxy_request_buffering on;
|
||||
proxy_buffering off;
|
||||
proxy_buffer_size 4k;
|
||||
proxy_buffers 4 12k;
|
||||
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
|
||||
proxy_pass http://146.56.147.12:3003;
|
||||
}
|
||||
|
||||
location / {
|
||||
access_log /var/log/nginx/access.log main;
|
||||
client_max_body_size 5120m;
|
||||
client_body_buffer_size 5120m;
|
||||
client_body_timeout 6000s;
|
||||
proxy_send_timeout 10000s;
|
||||
proxy_read_timeout 10000s;
|
||||
proxy_connect_timeout 600s;
|
||||
proxy_max_temp_file_size 5120m;
|
||||
proxy_request_buffering on;
|
||||
proxy_buffering off;
|
||||
proxy_buffer_size 4k;
|
||||
proxy_buffers 4 12k;
|
||||
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
|
||||
proxy_pass http://146.56.147.12:3001;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user