-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.mattermost.yaml
More file actions
145 lines (139 loc) · 4.72 KB
/
docker-compose.mattermost.yaml
File metadata and controls
145 lines (139 loc) · 4.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
# ███████╗██╗ ██╗███████╗██╗███████╗██╗ ██╗
# ██╔════╝██║ ██║╚══███╔╝██║██╔════╝╚██╗ ██╔╝
# █████╗ ██║ ██║ ███╔╝ ██║█████╗ ╚████╔╝
# ██╔══╝ ██║ ██║ ███╔╝ ██║██╔══╝ ╚██╔╝
# ███████╗███████╗██║███████╗██║██║ ██║
# ╚══════╝╚══════╝╚═╝╚══════╝╚═╝╚═╝ ╚═╝
#
# Deploy elizaOS anywhere - Mattermost Recipie
# https://github.com/bealers/elizify
#
# Complete Mattermost + elizaOS demonstration environment
# Includes: elizaOS Agent, Mattermost Server, PostgreSQL Database
# Pre-configured with admin user, bot account, and demo company
services:
# PostgreSQL 15 with vector extensions (ElizaOS standard)
postgres:
image: pgvector/pgvector:pg15
environment:
POSTGRES_USER: mmuser
POSTGRES_PASSWORD: mmuser_password
POSTGRES_DB: mattermost # Create Mattermost database
POSTGRES_INITDB_ARGS: "--auth-host=md5"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./db/init-mattermost.sql:/docker-entrypoint-initdb.d/init.sql
ports:
- "5433:5432"
networks:
- mattermost-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U mmuser"]
interval: 10s
timeout: 5s
retries: 5
# Use working Mattermost setup
mattermost:
image: mattermost/mattermost-team-edition:7.8
depends_on:
postgres:
condition: service_healthy
environment:
MM_SQLSETTINGS_DRIVERNAME: postgres
MM_SQLSETTINGS_DATASOURCE: postgres://mmuser:mmuser_password@postgres:5432/mattermost?sslmode=disable&connect_timeout=10
MM_SERVICESETTINGS_SITEURL: http://localhost:8065
MM_TEAMSETTINGS_ENABLEOPENSERVER: true
MM_SERVICESETTINGS_ENABLEDEVELOPER: true
MM_PLUGINSETTINGS_ENABLEUPLOADS: true
MM_PLUGINSETTINGS_ALLOWINSECUREDOWNLOADURL: true
MM_SERVICESETTINGS_ALLOWCORSFROM: "*"
MM_SERVICESETTINGS_ENABLEBOTACCOUNTCREATION: true
MM_SERVICESETTINGS_ENABLEUSERACCESSTOKENS: true
MM_INSTALL_TYPE: docker
MM_LOGSETTINGS_ENABLECONSOLE: true
MM_LOGSETTINGS_CONSOLELEVEL: DEBUG
ports:
- "8065:8065"
networks:
- mattermost-network
volumes:
- mattermost_data:/mattermost/data
- mattermost_logs:/mattermost/logs
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8065/"]
interval: 30s
timeout: 10s
retries: 10
# ElizaOS with working configuration
elizaos:
build:
context: .
dockerfile: Dockerfile
container_name: elizify-mattermost-elizaos
restart: unless-stopped
ports:
- "8070:3000"
depends_on:
mattermost:
condition: service_healthy
postgres:
condition: service_healthy
env_file:
- .env
environment:
NODE_ENV: development
LOG_LEVEL: debug
DEBUG: true
MATTERMOST_URL: http://mattermost:8065
MATTERMOST_HOST_EXTERNAL: mattermost
MATTERMOST_PORT: 8065
MATTERMOST_TEAM: elizify
MATTERMOST_BOT_USERNAME: elliot
MATTERMOST_DEFAULT_CHANNEL: general
POSTGRES_URL: postgres://mmuser:mmuser_password@postgres:5432/elizaos?sslmode=disable
CHARACTER_FILE: /app/config/characters/elliot.character.json
volumes:
- elizaos_data:/app/data
- elizaos_logs:/app/logs
- ./config/characters:/app/config/characters:ro
networks:
- mattermost-network
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/"]
interval: 15s
timeout: 10s
retries: 3
start_period: 30s
# Working init script
init:
build:
context: .
dockerfile: Dockerfile
container_name: elizify-mattermost-init
depends_on:
mattermost:
condition: service_healthy
environment:
MATTERMOST_URL: http://mattermost:8065
MATTERMOST_TEAM: elizify
MATTERMOST_BOT_USERNAME: elliot
MATTERMOST_DEFAULT_CHANNEL: general
MATTERMOST_TOKEN: elizify-demo-bot-token-12345
ADMIN_EMAIL: demo-admin@example.com
ADMIN_PASSWORD: demo123!
PATH: "/root/.bun/bin:$PATH"
user: root
command: ["/root/.bun/bin/bun", "run", "/app/scripts/mattermost/init-mattermost-demo.ts"]
networks:
- mattermost-network
profiles:
- init
networks:
mattermost-network:
driver: bridge
volumes:
postgres_data:
mattermost_data:
mattermost_logs:
elizaos_data:
elizaos_logs: