mirror of https://github.com/msgbyte/tailchat
chore: 删除部分无用配置
parent
ac9341ddc2
commit
b4cb623847
@ -1,15 +0,0 @@
|
||||
FROM node:lts-alpine
|
||||
|
||||
# Working directory
|
||||
WORKDIR /app
|
||||
|
||||
# Install dependencies
|
||||
COPY . .
|
||||
RUN npm install -g pnpm@6.24.2 http-server-spa@1.3.0
|
||||
RUN pnpm install
|
||||
|
||||
EXPOSE 11011
|
||||
|
||||
RUN cd web && pnpm build
|
||||
|
||||
CMD node web/scripts/sync-config-from-env.js && http-server-spa ./web/dist index.html 11011
|
@ -1,11 +0,0 @@
|
||||
version: "3.3"
|
||||
|
||||
services:
|
||||
tailchat-web:
|
||||
build:
|
||||
context: .
|
||||
image: tailchat-web
|
||||
environment:
|
||||
SERVICE_URL: ${SERVICE_URL}
|
||||
ports:
|
||||
- 11011:11011
|
@ -1,33 +0,0 @@
|
||||
FROM node:lts-alpine
|
||||
|
||||
# Working directory
|
||||
WORKDIR /app
|
||||
|
||||
# Install dependencies
|
||||
RUN npm install -g pnpm@7.1.9
|
||||
|
||||
# Install plugins and sdk dependency
|
||||
COPY ./package.json ./pnpm-lock.yaml ./pnpm-workspace.yaml ./tsconfig.json ./.npmrc ./
|
||||
COPY ./packages ./packages
|
||||
COPY ./plugins ./plugins
|
||||
RUN pnpm install
|
||||
|
||||
# Copy source
|
||||
COPY . .
|
||||
RUN pnpm install
|
||||
|
||||
# Build and cleanup
|
||||
ENV NODE_ENV=production
|
||||
RUN pnpm run build
|
||||
|
||||
# Install plugins(whitelist)
|
||||
RUN pnpm run plugin:install com.msgbyte.tasks com.msgbyte.linkmeta com.msgbyte.github com.msgbyte.simplenotify
|
||||
|
||||
# Copy public files
|
||||
RUN mkdir -p ./dist/public && cp -r ./public/plugins ./dist/public && cp ./public/registry.json ./dist/public
|
||||
|
||||
# web static service port
|
||||
EXPOSE 3000
|
||||
|
||||
# Start server
|
||||
CMD ["pnpm", "start:service"]
|
@ -1,26 +0,0 @@
|
||||
LOGGER=true
|
||||
LOGLEVEL=info
|
||||
SERVICEDIR=services
|
||||
|
||||
TRANSPORTER=redis://redis:6379
|
||||
|
||||
CACHER=redis://redis:6379
|
||||
|
||||
REDIS_URL=redis://redis:6379
|
||||
MONGO_URL=mongodb://mongo/tailchat
|
||||
SECRET=
|
||||
|
||||
# file
|
||||
API_URL=https://paw-server-nightly.moonrailgun.com
|
||||
|
||||
# minio
|
||||
MINIO_URL=minio:9000
|
||||
MINIO_USER=tailchat
|
||||
MINIO_PASS=com.msgbyte.tailchat
|
||||
|
||||
# SMTP
|
||||
SMTP_SENDER=
|
||||
SMTP_URI=
|
||||
|
||||
# metrics
|
||||
PROMETHEUS=1
|
@ -1,176 +0,0 @@
|
||||
version: "3.3"
|
||||
|
||||
services:
|
||||
# 应用网关
|
||||
service-gateway:
|
||||
build:
|
||||
context: .
|
||||
image: tailchat-server
|
||||
restart: unless-stopped
|
||||
env_file: docker-compose.env
|
||||
environment:
|
||||
SERVICES: core/gateway
|
||||
PORT: 3000
|
||||
depends_on:
|
||||
- mongo
|
||||
- redis
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.api-gw.rule=PathPrefix(`/`)"
|
||||
- "traefik.http.services.api-gw.loadbalancer.server.port=3000"
|
||||
networks:
|
||||
- internal
|
||||
|
||||
# 用户服务
|
||||
service-user:
|
||||
build:
|
||||
context: .
|
||||
image: tailchat-server
|
||||
restart: unless-stopped
|
||||
env_file: docker-compose.env
|
||||
environment:
|
||||
SERVICES: core/user/*
|
||||
depends_on:
|
||||
- mongo
|
||||
- redis
|
||||
networks:
|
||||
- internal
|
||||
|
||||
# 群组服务
|
||||
service-group:
|
||||
build:
|
||||
context: .
|
||||
image: tailchat-server
|
||||
restart: unless-stopped
|
||||
env_file: docker-compose.env
|
||||
environment:
|
||||
SERVICES: core/group/*
|
||||
depends_on:
|
||||
- mongo
|
||||
- redis
|
||||
networks:
|
||||
- internal
|
||||
|
||||
# 聊天服务
|
||||
service-chat:
|
||||
build:
|
||||
context: .
|
||||
image: tailchat-server
|
||||
restart: unless-stopped
|
||||
env_file: docker-compose.env
|
||||
environment:
|
||||
SERVICES: core/chat/*
|
||||
depends_on:
|
||||
- mongo
|
||||
- redis
|
||||
networks:
|
||||
- internal
|
||||
|
||||
# 文件服务 / 插件注册中心 / 配置服务
|
||||
service-file:
|
||||
build:
|
||||
context: .
|
||||
image: tailchat-server
|
||||
restart: unless-stopped
|
||||
env_file: docker-compose.env
|
||||
environment:
|
||||
SERVICES: core/file,core/plugin/registry,core/config
|
||||
depends_on:
|
||||
- mongo
|
||||
- redis
|
||||
- minio
|
||||
networks:
|
||||
- internal
|
||||
|
||||
service-openapi:
|
||||
build:
|
||||
context: .
|
||||
image: tailchat-server
|
||||
restart: unless-stopped
|
||||
env_file: docker-compose.env
|
||||
environment:
|
||||
SERVICES: openapi/app,openapi/oidc/oidc
|
||||
OPENAPI_PORT: 3003
|
||||
OPENAPI_UNDER_PROXY: "true"
|
||||
depends_on:
|
||||
- mongo
|
||||
- redis
|
||||
- minio
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.openapi-oidc.rule=PathPrefix(`/open`)"
|
||||
- "traefik.http.services.openapi-oidc.loadbalancer.server.port=3003"
|
||||
networks:
|
||||
- internal
|
||||
|
||||
# 插件服务(所有插件)
|
||||
service-all-plugins:
|
||||
build:
|
||||
context: .
|
||||
image: tailchat-server
|
||||
restart: unless-stopped
|
||||
env_file: docker-compose.env
|
||||
environment:
|
||||
SERVICEDIR: plugins
|
||||
depends_on:
|
||||
- mongo
|
||||
- redis
|
||||
- minio
|
||||
networks:
|
||||
- internal
|
||||
|
||||
# 数据库
|
||||
mongo:
|
||||
image: mongo:4
|
||||
restart: on-failure
|
||||
volumes:
|
||||
- data:/data/db
|
||||
networks:
|
||||
- internal
|
||||
|
||||
# 数据缓存与中转通讯
|
||||
redis:
|
||||
image: redis:alpine
|
||||
restart: on-failure
|
||||
networks:
|
||||
- internal
|
||||
|
||||
# 存储服务
|
||||
minio:
|
||||
image: minio/minio
|
||||
restart: on-failure
|
||||
networks:
|
||||
- internal
|
||||
environment:
|
||||
MINIO_ROOT_USER: tailchat
|
||||
MINIO_ROOT_PASSWORD: com.msgbyte.tailchat
|
||||
volumes:
|
||||
- storage:/data
|
||||
command: minio server /data --console-address ":9001"
|
||||
|
||||
# 路由转发
|
||||
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:
|
||||
name: tailchat-internal
|
||||
|
||||
volumes:
|
||||
data:
|
||||
storage:
|
Loading…
Reference in New Issue