diff --git a/docker-compose.test.yml b/docker-compose.test.yml index 8115afc..c989633 100644 --- a/docker-compose.test.yml +++ b/docker-compose.test.yml @@ -2,6 +2,7 @@ version: '3.4' services: netbox: &netbox image: ${IMAGE-netboxcommunity/netbox:latest} + restart: unless-stopped depends_on: postgres: condition: service_healthy @@ -40,6 +41,7 @@ services: test: "ps -aux | grep -v grep | grep -q housekeeping || exit 1" postgres: image: postgres:16-alpine + restart: unless-stopped env_file: env/postgres.env healthcheck: test: "pg_isready -t 2 -d $$POSTGRES_DB -U $$POSTGRES_USER" ## $$ because of docker-compose @@ -48,6 +50,7 @@ services: retries: 5 redis: &redis image: redis:7-alpine + restart: unless-stopped command: - sh - -c # this is to evaluate the $REDIS_PASSWORD from the env diff --git a/docker-compose.yml b/docker-compose.yml index 8b0ea61..2deb0fa 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,6 +2,7 @@ version: '3.4' services: netbox: &netbox image: docker.io/netboxcommunity/netbox:${VERSION-v3.7-2.8.0} + restart: unless-stopped depends_on: - postgres - redis @@ -48,6 +49,7 @@ services: # postgres postgres: image: docker.io/postgres:16-alpine + restart: unless-stopped env_file: env/postgres.env volumes: - netbox-postgres-data:/var/lib/postgresql/data @@ -55,6 +57,7 @@ services: # redis redis: image: docker.io/redis:7-alpine + restart: unless-stopped command: - sh - -c # this is to evaluate the $REDIS_PASSWORD from the env @@ -64,6 +67,7 @@ services: - netbox-redis-data:/data redis-cache: image: docker.io/redis:7-alpine + restart: unless-stopped command: - sh - -c # this is to evaluate the $REDIS_PASSWORD from the env