From 4d3fb85758f3d0de96a76720e7ed927eacea4f54 Mon Sep 17 00:00:00 2001 From: Vincent Fretin Date: Sun, 15 Dec 2024 11:07:20 +0100 Subject: [PATCH] Use docker restart policy unless-stopped (#16) --- docker/README.md | 4 ++-- docker/docker-compose.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docker/README.md b/docker/README.md index 6b4d20c..e83a891 100644 --- a/docker/README.md +++ b/docker/README.md @@ -91,13 +91,13 @@ docker build --pull --no-cache -t janus:latest . start the container: ``` -docker run -d --restart always --net=host --name="janus" -e MAX_ROOM_SIZE=15 -e ADMIN_SECRET=YourOwnPassword janus:latest +docker run -d --restart unless-stopped --net=host --name="janus" -e MAX_ROOM_SIZE=15 -e ADMIN_SECRET=YourOwnPassword janus:latest ``` If you secure the rooms with JWT, specify the public key like this: ``` -docker run -d --restart always --net=host --name="janus" -e MAX_ROOM_SIZE=15 -e ADMIN_SECRET=YourOwnPassword -e AUTH_KEY=/keys/public.der -v $PWD/public.der:/keys/public.der:ro janus:latest +docker run -d --restart unless-stopped --net=host --name="janus" -e MAX_ROOM_SIZE=15 -e ADMIN_SECRET=YourOwnPassword -e AUTH_KEY=/keys/public.der -v $PWD/public.der:/keys/public.der:ro janus:latest ``` look at the logs: diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 68834aa..4233490 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -1,7 +1,7 @@ services: janus: network_mode: host - restart: always + restart: unless-stopped build: . image: janus:latest environment: