perf: reduce instance number in docker-compose

reduce usage for tailchat
test/ios-bundle
moonrailgun 2 years ago
parent 6f57f80f57
commit 920cbf6a44

@ -1,19 +1,20 @@
version: "3.3" version: "3.3"
services: services:
# Gateway # Tailchat Core Services
service-gateway: service-core:
build: build:
context: . context: .
image: tailchat image: tailchat
restart: unless-stopped restart: unless-stopped
env_file: docker-compose.env env_file: docker-compose.env
environment: environment:
SERVICES: core/gateway SERVICES: core/gateway,core/user/*.service.js,core/group/*.service.js,core/chat/*.service.js,core/file,core/plugin/registry,core/config
PORT: 3000 PORT: 3000
depends_on: depends_on:
- mongo - mongo
- redis - redis
- minio
labels: labels:
- "traefik.enable=true" - "traefik.enable=true"
- "traefik.http.routers.api-gw.rule=PathPrefix(`/`)" - "traefik.http.routers.api-gw.rule=PathPrefix(`/`)"
@ -21,67 +22,6 @@ services:
networks: networks:
- internal - internal
# User Service
service-user:
build:
context: .
image: tailchat
restart: unless-stopped
env_file: docker-compose.env
environment:
SERVICES: core/user/*.service.js
depends_on:
- mongo
- redis
networks:
- internal
# Group Service
service-group:
build:
context: .
image: tailchat
restart: unless-stopped
env_file: docker-compose.env
environment:
SERVICES: core/group/*.service.js
depends_on:
- mongo
- redis
networks:
- internal
# Chat Service
service-chat:
build:
context: .
image: tailchat
restart: unless-stopped
env_file: docker-compose.env
environment:
SERVICES: core/chat/*.service.js
depends_on:
- mongo
- redis
networks:
- internal
# File Service / Plugin Registry / Configuration Service
service-file:
build:
context: .
image: tailchat
restart: unless-stopped
env_file: docker-compose.env
environment:
SERVICES: core/file,core/plugin/registry,core/config
depends_on:
- mongo
- redis
- minio
networks:
- internal
# Open Platform # Open Platform
service-openapi: service-openapi:
build: build:

Loading…
Cancel
Save