Browse Source

refactor: Remove restart policy environment variable

Owen Diffey 1 month ago
parent
commit
15428b4274

+ 0 - 1
.env.example

@@ -1,5 +1,4 @@
 COMPOSE_PROJECT_NAME=musare
-RESTART_POLICY=unless-stopped
 DOCKER_COMMAND=docker
 
 APP_ENV=production

+ 0 - 1
.github/workflows/automated-tests.yml

@@ -4,7 +4,6 @@ on: [ push, pull_request, workflow_dispatch ]
 
 env:
     COMPOSE_PROJECT_NAME: musare
-    RESTART_POLICY: unless-stopped
     APP_ENV: production
     BACKEND_HOST: 127.0.0.1
     BACKEND_PORT: 8080

+ 0 - 1
.github/workflows/build-lint.yml

@@ -4,7 +4,6 @@ on: [ push, pull_request, workflow_dispatch ]
 
 env:
     COMPOSE_PROJECT_NAME: musare
-    RESTART_POLICY: unless-stopped
     APP_ENV: production
     BACKEND_HOST: 127.0.0.1
     BACKEND_PORT: 8080

+ 0 - 1
.wiki/Configuration.md

@@ -25,7 +25,6 @@ machine, even though the application within the container is listening on `21017
 | Property | Description |
 | --- | --- |
 | `COMPOSE_PROJECT_NAME` | Should be a unique name for this installation, especially if you have multiple instances of Musare on the same machine. |
-| `RESTART_POLICY` | Restart policy for Docker containers, values can be found [here](https://docs.docker.com/config/containers/start-containers-automatically/). |
 | `DOCKER_COMMAND` | Should be either `docker` or `podman`.  |
 | `APP_ENV` | Should be either `production` or `development`.  |
 | `BACKEND_HOST` | Backend container host. Only used for development mode. |

+ 4 - 4
docker-compose.yml

@@ -6,7 +6,7 @@ services:
       context: .
       dockerfile: ./Dockerfile
       target: backend
-    restart: ${RESTART_POLICY:-unless-stopped}
+    restart: unless-stopped
     volumes:
       - ./backend/config:/opt/app/config
     environment:
@@ -47,7 +47,7 @@ services:
         MUSARE_DEBUG_GIT_BRANCH: ${MUSARE_DEBUG_GIT_BRANCH:-true}
         MUSARE_DEBUG_GIT_LATEST_COMMIT: "${MUSARE_DEBUG_GIT_LATEST_COMMIT:-true}"
         MUSARE_DEBUG_GIT_LATEST_COMMIT_SHORT: "${MUSARE_DEBUG_GIT_LATEST_COMMIT_SHORT:-true}"
-    restart: ${RESTART_POLICY:-unless-stopped}
+    restart: unless-stopped
     ports:
       - "${FRONTEND_HOST:-0.0.0.0}:${FRONTEND_PORT:-80}:80"
     environment:
@@ -73,7 +73,7 @@ services:
 
   mongo:
     image: docker.io/mongo:${MONGO_VERSION}
-    restart: ${RESTART_POLICY:-unless-stopped}
+    restart: unless-stopped
     environment:
       - MONGO_INITDB_ROOT_USERNAME=admin
       - MONGO_INITDB_ROOT_PASSWORD=${MONGO_ROOT_PASSWORD}
@@ -93,7 +93,7 @@ services:
 
   redis:
     image: docker.io/redis:7
-    restart: ${RESTART_POLICY:-unless-stopped}
+    restart: unless-stopped
     command: "--notify-keyspace-events Ex --requirepass ${REDIS_PASSWORD} --appendonly yes"
     volumes:
       - /data