Ensure containers are brought backup when exiting on error

This is esp. important for the NodeJS (backend) container as  Node will
exit on any unhandled error, it is best practice to let the errored
process crash and start a new one in its place. It this case we use
docker to do that for us (`restart: always` policy)
This commit is contained in:
Hristo 2024-05-16 09:53:33 -04:00
parent ebbe18ab45
commit 48018990be

View file

@ -3,6 +3,7 @@ services:
build: build:
context: . context: .
dockerfile: searxng.dockerfile dockerfile: searxng.dockerfile
restart: always
expose: expose:
- 4000 - 4000
ports: ports:
@ -16,12 +17,17 @@ services:
dockerfile: backend.dockerfile dockerfile: backend.dockerfile
args: args:
- SEARXNG_API_URL=null - SEARXNG_API_URL=null
restart: always
volumes:
- "/Volumes/keys/headllamp/keys/:/var/keys/"
- "${GOOGLE_APPLICATION_CREDENTIALS}:/var/keys/gcp_service_account.json"
environment: environment:
SEARXNG_API_URL: 'http://searxng:8080' SEARXNG_API_URL: 'http://searxng:8080'
SUPER_SECRET_KEY: ${SUPER_SECRET_KEY} SUPER_SECRET_KEY: ${SUPER_SECRET_KEY}
OPENAI: ${OPENAI} OPENAI: ${OPENAI}
GROQ: ${GROQ} GROQ: ${GROQ}
OLLAMA_API_URL: ${OLLAMA_API_URL} OLLAMA_API_URL: ${OLLAMA_API_URL}
GOOGLE_APPLICATION_CREDENTIALS: /var/keys/gcp_service_account.json
depends_on: depends_on:
- searxng - searxng
expose: expose: