Created
April 13, 2024 03:39
-
-
Save shenjackyuanjie/31925b7db8db961dabd62dea3aad624c to your computer and use it in GitHub Desktop.
docker-compose for tailchat
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.5" | |
services: | |
# Tailchat Core Services | |
service-core: | |
build: | |
context: . | |
image: moonrailgun/tailchat:1.11.0 | |
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 | |
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: moonrailgun/tailchat:1.11.0 | |
restart: unless-stopped | |
env_file: docker-compose.env | |
environment: | |
SERVICES: openapi/app,openapi/bot,openapi/integration,openapi/oidc/oidc | |
OPENAPI_PORT: 3000 | |
OPENAPI_UNDER_PROXY: "false" | |
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=3000" | |
networks: | |
- internal | |
# Plugin Service (All Plugins) | |
service-all-plugins: | |
build: | |
context: . | |
image: moonrailgun/tailchat:1.11.0 | |
restart: unless-stopped | |
env_file: docker-compose.env | |
environment: | |
SERVICEDIR: plugins | |
depends_on: | |
- mongo | |
- redis | |
- minio | |
networks: | |
- internal | |
service-admin: | |
build: | |
context: ../ | |
image: moonrailgun/tailchat:1.11.0 | |
restart: unless-stopped | |
env_file: docker-compose.env | |
depends_on: | |
- mongo | |
- redis | |
labels: | |
- "traefik.enable=true" | |
- "traefik.http.routers.admin.rule=PathPrefix(`/admin`)" | |
- "traefik.http.services.admin.loadbalancer.server.port=3000" | |
networks: | |
- internal | |
command: pnpm start:admin | |
# Database | |
mongo: | |
image: mongo:4 | |
restart: on-failure | |
volumes: | |
- 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: | |
- /volume2/docker/tailchat/minio:/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: | |
- 5526:80 | |
- 127.0.0.1:5524:8080 | |
volumes: | |
- /var/run/docker.sock:/var/run/docker.sock:ro | |
networks: | |
- internal | |
- default | |
networks: | |
internal: | |
name: tailchat-internal | |
volumes: | |
data: | |
storage: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment