restart: always -> unless-stopped

This commit is contained in:
keyan 2024-03-07 10:19:37 -06:00
parent fab750352f
commit f2fd2eb1d7
1 changed files with 6 additions and 6 deletions

View File

@ -3,7 +3,7 @@ services:
db: db:
container_name: db container_name: db
build: ./db build: ./db
restart: always restart: unless-stopped
healthcheck: healthcheck:
test: ["CMD-SHELL", "pg_isready -U sn -d stackernews"] test: ["CMD-SHELL", "pg_isready -U sn -d stackernews"]
interval: 5s interval: 5s
@ -21,7 +21,7 @@ services:
app: app:
container_name: app container_name: app
build: ./ build: ./
restart: always restart: unless-stopped
healthcheck: healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000"] test: ["CMD", "curl", "-f", "http://localhost:3000"]
interval: 10s interval: 10s
@ -49,7 +49,7 @@ services:
worker: worker:
container_name: worker container_name: worker
build: ./worker build: ./worker
restart: always restart: unless-stopped
depends_on: depends_on:
db: db:
condition: service_healthy condition: service_healthy
@ -81,7 +81,7 @@ services:
timeout: 10s timeout: 10s
interval: 10s interval: 10s
retries: 3 retries: 3
restart: always restart: unless-stopped
env_file: env_file:
- ./.env.sndev - ./.env.sndev
expose: expose:
@ -98,7 +98,7 @@ services:
interval: 10s interval: 10s
timeout: 10s timeout: 10s
retries: 10 retries: 10
restart: always restart: unless-stopped
environment: environment:
- discovery.type=single-node - discovery.type=single-node
- plugins.security.disabled=true - plugins.security.disabled=true
@ -123,7 +123,7 @@ services:
os-dashboard: os-dashboard:
image: opensearchproject/opensearch-dashboards:latest image: opensearchproject/opensearch-dashboards:latest
container_name: os-dashboard container_name: os-dashboard
restart: always restart: unless-stopped
depends_on: depends_on:
opensearch: opensearch:
condition: service_healthy condition: service_healthy