mirror of
https://github.com/Inside4ndroid/TMDB-Embed-API.git
synced 2026-10-22 09:35:11 +00:00
fix(server): bind to 0.0.0.0; set BIND_HOST for Docker/runtime to expose port
This commit is contained in:
@@ -22,6 +22,7 @@ ARG VERSION=dev
|
|||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
ENV NODE_ENV=production \
|
ENV NODE_ENV=production \
|
||||||
API_PORT=8787 \
|
API_PORT=8787 \
|
||||||
|
BIND_HOST=0.0.0.0 \
|
||||||
APP_VERSION=${VERSION}
|
APP_VERSION=${VERSION}
|
||||||
|
|
||||||
# Create non-root user
|
# Create non-root user
|
||||||
|
|||||||
+6
-2
@@ -374,8 +374,12 @@ app.get('/api/streams/:provider/:type/:tmdbId', async (req,res) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const PORT = config.port;
|
const PORT = config.port;
|
||||||
const server = app.listen(PORT, () => {
|
const HOST = process.env.BIND_HOST || '0.0.0.0';
|
||||||
console.log(`TMDB Embed REST API listening on http://localhost:${PORT}`);
|
const server = app.listen(PORT, HOST, () => {
|
||||||
|
console.log(`TMDB Embed REST API listening on http://${HOST}:${PORT}`);
|
||||||
|
if (HOST !== 'localhost') {
|
||||||
|
console.log(`Local access (if running on your machine): http://localhost:${PORT}`);
|
||||||
|
}
|
||||||
console.log('Endpoints:');
|
console.log('Endpoints:');
|
||||||
console.log(' GET /api/health');
|
console.log(' GET /api/health');
|
||||||
console.log(' GET /api/metrics');
|
console.log(' GET /api/metrics');
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ services:
|
|||||||
# Alternative: supply JSON array
|
# Alternative: supply JSON array
|
||||||
# - TMDB_API_KEYS=["key1","key2"]
|
# - TMDB_API_KEYS=["key1","key2"]
|
||||||
- API_PORT=8787
|
- API_PORT=8787
|
||||||
|
- BIND_HOST=0.0.0.0
|
||||||
# FebBox cookies (comma separated) if you want Showbox immediately functional
|
# FebBox cookies (comma separated) if you want Showbox immediately functional
|
||||||
- FEBBOX_COOKIES=${FEBBOX_COOKIES:-}
|
- FEBBOX_COOKIES=${FEBBOX_COOKIES:-}
|
||||||
ports:
|
ports:
|
||||||
|
|||||||
Reference in New Issue
Block a user