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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
# =============================================================================
# Sockudo Development Override - Docker Compose
# Usage: docker-compose -f docker-compose.yml -f docker-compose.dev.yml up -d
# =============================================================================
services:
# Development-optimized Sockudo configuration
sockudo:
# Build from source for development
build:
context: .
dockerfile: Dockerfile
target: runtime
# Development environment variables
environment:
# Enhanced logging for development
- RUST_LOG=debug,sockudo=debug,tower_http=debug
- DEBUG=true
# Development app settings
- SOCKUDO_DEFAULT_APP_ENABLED=true
- SOCKUDO_ENABLE_CLIENT_MESSAGES=true
- SOCKUDO_DEFAULT_APP_MAX_CONNECTIONS=100
# Relaxed security for development
- RATE_LIMITER_ENABLED=false
- SSL_ENABLED=false
# Development port mapping
ports:
- "6001:6001" # Main server
- "6002:6002" # Cluster port
- "9601:9601" # Metrics
# Development volumes (with hot reload support)
volumes:
- ./config:/app/config
- ./logs:/app/logs
- ./src:/app/src:ro # Mount source for reference
- ./.env:/app/.env:ro
# Relaxed resource limits for development
deploy:
resources:
limits:
memory: 256M
cpus: '0.5'
# Development health check (more frequent)
healthcheck:
test:
interval: 15s
timeout: 5s
retries: 3
start_period: 10s
# Development Redis (less persistence, more logs)
redis:
# Development Redis configuration
command: >
sh -c "
redis-server
--appendonly no
--maxmemory 128mb
--maxmemory-policy allkeys-lru
--loglevel debug
--save ''
"
# Keep external port for development access
ports:
- "6379:6379"
# Development resource limits
deploy:
resources:
limits:
memory: 128M
cpus: '0.25'
# Relaxed health check
healthcheck:
test:
interval: 15s
timeout: 5s
retries: 2
start_period: 5s
# Development MySQL with sample data
mysql:
image: mysql:8.0
container_name: sockudo-mysql-dev
restart: unless-stopped
environment:
- MYSQL_ROOT_PASSWORD=root123
- MYSQL_DATABASE=sockudo_dev
- MYSQL_USER=sockudo
- MYSQL_PASSWORD=sockudo123
# Keep external port for development access
ports:
- "3306:3306"
# Development MySQL configuration
command: >
--default-authentication-plugin=mysql_native_password
--innodb-buffer-pool-size=64M
--max-connections=50
--general-log=1
--general-log-file=/var/lib/mysql/general.log
--slow-query-log=1
--long-query-time=1
volumes:
- mysql-dev-data:/var/lib/mysql
- ./sql/init-dev.sql:/docker-entrypoint-initdb.d/init.sql:ro
- ./sql/sample-data.sql:/docker-entrypoint-initdb.d/sample-data.sql:ro
deploy:
resources:
limits:
memory: 256M
cpus: '0.5'
networks:
- sockudo-network
# Development tools container
dev-tools:
image: alpine:latest
container_name: sockudo-dev-tools
restart: "no"
# Development tools
command: >
sh -c "
apk add --no-cache curl jq redis mysql-client &&
echo 'Development tools ready!' &&
tail -f /dev/null
"
volumes:
- ./scripts:/scripts:ro
networks:
- sockudo-network
# Redis Commander for development
redis-commander:
image: rediscommander/redis-commander:latest
container_name: sockudo-redis-commander
restart: unless-stopped
environment:
- REDIS_HOSTS=local:redis:6379
ports:
- "8081:8081"
depends_on:
- redis
networks:
- sockudo-network
# PHPMyAdmin for development (if using MySQL)
phpmyadmin:
image: phpmyadmin/phpmyadmin:latest
container_name: sockudo-phpmyadmin
restart: unless-stopped
environment:
- PMA_HOST=mysql
- PMA_USER=sockudo
- PMA_PASSWORD=sockudo123
ports:
- "8080:80"
depends_on:
- mysql
networks:
- sockudo-network
# Mailhog for testing webhooks (development)
mailhog:
image: mailhog/mailhog:latest
container_name: sockudo-mailhog
restart: unless-stopped
ports:
- "1025:1025" # SMTP
- "8025:8025" # Web UI
networks:
- sockudo-network
volumes:
mysql-dev-data:
driver: local