Skip to content

Commit cfac742

Browse files
committed
chore: Update default compose to embedded Redis setup
1 parent bb5dc17 commit cfac742

File tree

1 file changed

+9
-62
lines changed

1 file changed

+9
-62
lines changed

docs/quick_start.md

Lines changed: 9 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -73,17 +73,13 @@ services:
7373
- APP_URL=${APP_URL:-http://localhost}
7474
- APP_PORT=${APP_PORT:-36400}
7575

76-
# Web Server Configuration
77-
# - NGINX_ENABLED=true # Set to false to disable embedded NGINX and use your own service
78-
# - FPMPORT=9000 # Default FPM port
79-
8076
# Postgres Configuration
8177
- ENABLE_POSTGRES=true # Use embedded Postgres, disable to use your own Postgres service
8278
- PG_DATABASE=${PG_DATABASE:-m3ue}
8379
- PG_USER=${PG_USER:-m3ue}
8480
- PG_PASSWORD=${PG_PASSWORD:-changeme}
8581
- PG_PORT=${PG_PORT:-5432}
86-
82+
8783
# Database Connection (m3u-editor)
8884
- DB_CONNECTION=pgsql
8985
- DB_HOST=localhost
@@ -93,10 +89,9 @@ services:
9389
- DB_PASSWORD=${PG_PASSWORD:-changeme}
9490

9591
# Redis configuration
96-
- REDIS_ENABLED=false # Disable embedded Redis
92+
- REDIS_ENABLED=true # Use embedded Redis
9793
- REDIS_SERVER_PORT=${REDIS_PORT:-6379}
98-
- REDIS_HOST=${REDIS_HOST:-redis}
99-
- REDIS_PASSWORD=${REDIS_PASSWORD:-changeme}
94+
# -REDIS_PASSWORD=${M3U_PROXY_TOKEN:-changeme} # Automatically set to API_TOKEN
10095

10196
# M3U Proxy Configuration (External)
10297
- M3U_PROXY_ENABLED=false # Disable embedded and use external m3u-proxy
@@ -112,14 +107,10 @@ services:
112107
restart: unless-stopped
113108
ports:
114109
- "${APP_PORT:-36400}:${APP_PORT:-36400}" # Main application port
110+
- "${XTREAM_PORT:-36401}:${XTREAM_PORT:-36401}" # Xtream API endpoint (when XTREAM_ONLY_ENABLED=true)
115111
# - "${PG_PORT:-5432}:${PG_PORT:-5432}" # Uncomment to expose PostgreSQL
116112
networks:
117113
- m3u-network
118-
depends_on:
119-
m3u-proxy:
120-
condition: service_healthy
121-
redis:
122-
condition: service_healthy
123114
healthcheck:
124115
test: ["CMD", "curl", "-f", "http://127.0.0.1:${APP_PORT:-36400}/up"]
125116
interval: 30s
@@ -138,29 +129,21 @@ services:
138129
# Redis Configuration (for stream pooling)
139130
- REDIS_ENABLED=true
140131
- REDIS_PORT=${REDIS_PORT:-6379}
141-
- REDIS_HOST=${REDIS_HOST:-redis}
142-
- REDIS_PASSWORD=${REDIS_PASSWORD:-changeme}
132+
- REDIS_HOST=m3u-editor # Connect to m3u-editor's embedded Redis instance
143133
- REDIS_DB=6 # 1-5 used by m3u-editor, so use 6 for m3u-proxy
134+
# -REDIS_PASSWORD=${M3U_PROXY_TOKEN:-changeme} # Automatically set to API_TOKEN
144135
- ENABLE_REDIS_POOLING=true
145136

146137
# Logging
147138
- LOG_LEVEL=INFO
148-
149-
# Note: ROOT_PATH=/m3u-proxy is now the default, no need to set it explicitly
150-
# Only set ROOT_PATH= (empty) if you need to use the root path instead
151-
152-
# Optional: Additional configuration
153-
# - REDIS_POOL_MAX_CONNECTIONS=50
154-
# - STREAM_TIMEOUT=300
155-
# - CLEANUP_INTERVAL=60
156139
restart: unless-stopped
157140
# Don't expose port externally - only accessible via internal network
158141
# ports:
159142
# - "${PROXY_PORT:-38085}:${PROXY_PORT:-38085}" # Uncomment only if you need direct external access
160143
networks:
161144
- m3u-network
162145
depends_on:
163-
redis:
146+
m3u-editor:
164147
condition: service_healthy
165148
#devices:
166149
# - /dev/dri:/dev/dri
@@ -170,51 +153,15 @@ services:
170153
timeout: 2s
171154
retries: 12
172155
start_period: 10s
173-
174-
# Optional: Resource limits
175-
# deploy:
176-
# resources:
177-
# limits:
178-
# cpus: '2.0'
179-
# memory: 2G
180-
# reservations:
181-
# cpus: '0.5'
182-
# memory: 512M
183-
184-
redis:
185-
image: redis:alpine3.22
186-
container_name: m3u-redis
187-
volumes:
188-
- redis-data:/data
189-
restart: unless-stopped
190-
command: redis-server --port ${REDIS_PORT:-6379} --requirepass ${REDIS_PASSWORD:-changeme} --appendonly no --save "" --maxmemory 256mb --maxmemory-policy allkeys-lru
191-
networks:
192-
- m3u-network
193-
healthcheck:
194-
test: ["CMD", "redis-cli", "-p", "${REDIS_PORT:-6379}", "-a", "${REDIS_PASSWORD:-changeme}", "ping"]
195-
interval: 10s
196-
timeout: 5s
197-
retries: 3
198-
start_period: 10s
199-
200-
# Optional: Resource limits
201-
# deploy:
202-
# resources:
203-
# limits:
204-
# cpus: '1.0'
205-
# memory: 512M
206-
# reservations:
207-
# cpus: '0.25'
208-
# memory: 128M
156+
209157
networks:
210158
m3u-network:
211159
driver: bridge
212160

213161
volumes:
214162
pgdata:
215163
driver: local
216-
redis-data:
217-
driver: local
164+
218165
```
219166

220167
### M3U-Proxy Embedded (Simple Alternative){#deployment-proxy\_embedded}

0 commit comments

Comments
 (0)