Skip to content

Commit

Permalink
build: better restart policy for docker (#218)
Browse files Browse the repository at this point in the history
We really need to be sure we restart at server startup. This seems not
to be completely the case.
  • Loading branch information
alexgarel authored Jul 17, 2024
1 parent c325226 commit d7aba59
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# base ES service definition
x-base-es-service: &base-es-service
image: docker.elastic.co/elasticsearch/elasticsearch:${STACK_VERSION}
restart: ${RESTART_POLICY}
restart: ${RESTART_POLICY:-always}
mem_limit: ${MEM_LIMIT}
ulimits:
memlock:
Expand Down Expand Up @@ -33,7 +33,7 @@ x-base-es-envs: &base-es-envs

x-api-common: &api-common
image: ghcr.io/openfoodfacts/search-a-licious/search_service_image:${TAG:-dev}
restart: ${RESTART_POLICY}
restart: ${RESTART_POLICY:-always}
environment:
- ELASTICSEARCH_URL=http://es01:9200
- SENTRY_DNS
Expand Down Expand Up @@ -78,7 +78,7 @@ services:
# elasticsearch browser
elasticvue:
image: cars10/elasticvue
restart: ${RESTART_POLICY}
restart: ${RESTART_POLICY:-always}
environment:
- NGINX_BASIC_AUTH_USER_PASSWD
ports:
Expand All @@ -102,6 +102,7 @@ services:
search_frontend:
# this is the nginx frontend serving react static version or redirecting queries
image: ghcr.io/openfoodfacts/search-a-licious/search_front_image:${TAG:-dev}
restart: ${RESTART_POLICY:-always}
depends_on:
- api
environment:
Expand Down

0 comments on commit d7aba59

Please sign in to comment.