diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..0d0bf63 --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,15 @@ +version: '3' +services: + filepizza: + image: kern/filepizza:latest + restart: always + build: + context: . + ports: + - 3333:3333 + environment: + - PORT=3333 + - EXTRA_ICE_SERVERS=turn:localhost:3478 + coturn: + image: instrumentisto/coturn:latest + network_mode: host diff --git a/src/ice.js b/src/ice.js index 4045ea5..511f069 100644 --- a/src/ice.js +++ b/src/ice.js @@ -16,6 +16,14 @@ var DEFAULT_ICE_SERVERS = [ } ]; +if (process.env.EXTRA_ICE_SERVERS) { + const extraICEServers = + process.env.EXTRA_ICE_SERVERS.split(',').map(function(server) { + return { urls: server.trim() } + }) + DEFAULT_ICE_SERVERS += extraICEServers +} + var CACHE_LIFETIME = 5 * 60 * 1000; // 5 minutes var cachedPromise = null;