Skip to content

Commit

Permalink
build: change restart policy (#533)
Browse files Browse the repository at this point in the history
* default to production settings
* add it to every service
  • Loading branch information
alexgarel authored Aug 8, 2024
1 parent c88ebd9 commit b1302e0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ COMPOSE_FILE=docker-compose.yml;docker/dev.yml
# version
DOCKER_TAG=dev

# no restart on dev mode (we want to launch containers only on demand)
RESTART_POLICY=no

# domain name
TAXONOMY_EDITOR_DOMAIN=taxonomy.localhost
# exposition
Expand Down
5 changes: 3 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "3.9"

services:
neo4j:
restart: ${RESTART_POLICY:-no}
restart: ${RESTART_POLICY:-always}
image: neo4j:5.14.0-community
ports:
# admin console
Expand All @@ -28,7 +28,7 @@ services:
# directory for neo4j imports
command: neo4j
taxonomy_api:
restart: ${RESTART_POLICY:-no}
restart: ${RESTART_POLICY:-always}
image: ghcr.io/openfoodfacts/taxonomy-editor/taxonomy_api:${DOCKER_TAG}
environment:
NEO4J_URI: "bolt://neo4j:7687"
Expand All @@ -40,6 +40,7 @@ services:
FORWARDED_ALLOW_IPS: "*"
taxonomy_frontend:
# this is the nginx frontend serving react static version or redirecting queries
restart: ${RESTART_POLICY:-always}
image: ghcr.io/openfoodfacts/taxonomy-editor/taxonomy_frontend:${DOCKER_TAG}
depends_on:
- taxonomy_api
Expand Down

0 comments on commit b1302e0

Please sign in to comment.