Skip to content

Commit

Permalink
chore(docker-compose): remove restart on-failure limit
Browse files Browse the repository at this point in the history
Previously we limited the services to 5 restarts to prevent flapping.
Unfortunately, the restart counter is only reset when services are
manually cycled. This means that on-failure:5 not only prevents
flapping, but also means services will eventually stop restarting
entirely if they run into periodic issues. On balance we thinking that
it's worth tolerating occasional service flapping for improved
robustness.
  • Loading branch information
djwhitt committed Jul 22, 2024
1 parent 96ae6ea commit c721d3d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion docker-compose.ao.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
services:
ao-cu:
image: ghcr.io/permaweb/ao-cu:latest
restart: on-failure:5
restart: on-failure
environment:
NODE_CONFIG_ENV: ${NODE_CONFIG_ENV:-development}
NODE_HEAPDUMP_OPTIONS: ${NODE_HEAPDUMP_OPTIONS:-nosignal}
Expand Down
8 changes: 4 additions & 4 deletions docker-compose.bundler.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
services:
upload-service:
image: ghcr.io/ardriveapp/turbo-upload-service:${UPLOAD_SERVICE_IMAGE_TAG:-fd1032e3012c0179577b08bbfe932f4ad7d805cd}
restart: on-failure:5
restart: on-failure
environment:
ARWEAVE_GATEWAY: ${ARWEAVE_GATEWAY:-http://envoy:3000}
PORT: ${UPLOAD_SERVICE_PORT:-5100}
Expand Down Expand Up @@ -42,7 +42,7 @@ services:

fulfillment-service:
image: ghcr.io/ardriveapp/turbo-upload-service-fulfillment:${UPLOAD_SERVICE_IMAGE_TAG:-6299f5497f5de479a1fb17ec86b764a4bf018f7b}
restart: on-failure:5
restart: on-failure
environment:
ARWEAVE_GATEWAY: ${ARWEAVE_GATEWAY:-http://envoy:3000}
NODE_ENV: ${NODE_ENV:-local}
Expand Down Expand Up @@ -84,7 +84,7 @@ services:

upload-service-pg:
image: postgres:13.8
restart: on-failure:5
restart: on-failure
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
Expand All @@ -98,7 +98,7 @@ services:

localstack:
image: ghcr.io/ardriveapp/turbo-upload-service-localstack:${UPLOAD_SERVICE_IMAGE_TAG:-6299f5497f5de479a1fb17ec86b764a4bf018f7b}
restart: on-failure:5
restart: on-failure
ports:
- '4566' # don't expose localstack externally by default
#- "127.0.0.1:4510-4559:4510-4559" # external services port range
Expand Down
10 changes: 5 additions & 5 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ services:
image: ghcr.io/ar-io/ar-io-envoy:${ENVOY_IMAGE_TAG:-latest}
build:
context: envoy/
restart: on-failure:5
restart: on-failure
ports:
- '3000:3000'
#- '9901:9901' # don't expose admin port by default
Expand All @@ -28,7 +28,7 @@ services:
image: ghcr.io/ar-io/ar-io-core:${CORE_IMAGE_TAG:-latest}
build:
context: .
restart: on-failure:5
restart: on-failure
ports:
- 4000:4000
volumes:
Expand Down Expand Up @@ -97,7 +97,7 @@ services:
redis:
image: redis:${REDIS_IMAGE_TAG:-7}
command: redis-server --maxmemory ${REDIS_MAX_MEMORY:-256mb} --maxmemory-policy allkeys-lru ${EXTRA_REDIS_FLAGS:---save "" --appendonly no}
restart: on-failure:5
restart: on-failure
ports:
- '6379' # don't expose redis externally by default
volumes:
Expand All @@ -107,7 +107,7 @@ services:

observer:
image: ghcr.io/ar-io/ar-io-observer:${OBSERVER_IMAGE_TAG:-b2c64c3e6838511966ca4b70c05294f35aa91114}
restart: on-failure:5
restart: on-failure
ports:
- 5050:5050
volumes:
Expand All @@ -134,7 +134,7 @@ services:

resolver:
image: ghcr.io/ar-io/arns-resolver:${RESOLVER_IMAGE_TAG:-e35776ceb4324494d403b1fb900bfd06eb97a652}
restart: on-failure:5
restart: on-failure
ports:
- 6000:6000
environment:
Expand Down

0 comments on commit c721d3d

Please sign in to comment.