ソースを参照

refactor(docker-compose): change container to restart policy "unless-stopped"

Nicolas Meienberger 1 年間 前
コミット
c18b00e78b

+ 4 - 3
packages/cli/assets/docker-compose.yml

@@ -4,7 +4,7 @@ services:
   tipi-reverse-proxy:
     container_name: tipi-reverse-proxy
     image: traefik:v2.8
-    restart: on-failure
+    restart: unless-stopped
     depends_on:
       - tipi-dashboard
     ports:
@@ -42,7 +42,7 @@ services:
   tipi-redis:
     container_name: tipi-redis
     image: redis:7.2.0
-    restart: on-failure
+    restart: unless-stopped
     command: redis-server --requirepass ${REDIS_PASSWORD}
     ports:
       - 6379:6379
@@ -59,6 +59,7 @@ services:
   tipi-worker:
     container_name: tipi-worker
     image: ghcr.io/runtipi/worker:${TIPI_VERSION}
+    restart: unless-stopped
     user: root
     healthcheck:
       test: ['CMD', 'curl', '-f', 'http://localhost:3000/healthcheck']
@@ -95,7 +96,7 @@ services:
 
   tipi-dashboard:
     image: ghcr.io/runtipi/runtipi:${TIPI_VERSION}
-    restart: on-failure
+    restart: unless-stopped
     container_name: tipi-dashboard
     networks:
       - tipi_main_network

+ 4 - 4
packages/worker/src/lib/docker/docker-helpers.test.ts

@@ -34,7 +34,7 @@ describe('docker helpers', async () => {
 
     // assert
     const expected = [
-      'docker compose',
+      'docker-compose',
       `--env-file /storage/app-data/${appId}/app.env`,
       `--project-name ${appId}`,
       `-f /app/apps/${appId}/docker-compose.yml`,
@@ -58,7 +58,7 @@ describe('docker helpers', async () => {
 
     // assert
     const expected = [
-      'docker compose',
+      'docker-compose',
       `--env-file /storage/app-data/${appId}/app.env`,
       `--env-file ${userEnvFile}`,
       `--project-name ${appId}`,
@@ -83,7 +83,7 @@ describe('docker helpers', async () => {
 
     // assert
     const expected = [
-      'docker compose',
+      'docker-compose',
       `--env-file /storage/app-data/${appId}/app.env`,
       `--project-name ${appId}`,
       `-f /app/apps/${appId}/docker-compose.yml`,
@@ -112,7 +112,7 @@ describe('docker helpers', async () => {
 
     // assert
     const expected = [
-      'docker compose',
+      'docker-compose',
       `--env-file /storage/app-data/${appId}/app.env`,
       `--project-name ${appId}`,
       `-f ${arm64ComposeFile}`,