Added firefly health checks
parent
cc2ac332d1
commit
2c88fbc493
|
@ -1,18 +1,25 @@
|
||||||
version: '3.3'
|
version: '2.8'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
build:
|
build:
|
||||||
context: '.'
|
context: '.'
|
||||||
dockerfile: './Dockerfile'
|
|
||||||
args:
|
args:
|
||||||
- 'LOCALE=$DEFAULT_LOCALE'
|
- 'LOCALE=$DEFAULT_LOCALE'
|
||||||
image: 'firefly-iii-cron:latest'
|
image: 'firefly-iii-cron:latest'
|
||||||
restart: 'always'
|
restart: 'always'
|
||||||
|
healthcheck:
|
||||||
|
test: 'curl -f localhost:8080 || exit 1'
|
||||||
|
interval: '1m'
|
||||||
|
timeout: '10s'
|
||||||
|
retries: 3
|
||||||
|
start_period: '10s'
|
||||||
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- 'db'
|
db:
|
||||||
- 'redis'
|
condition: 'service_healthy'
|
||||||
|
redis:
|
||||||
|
condition: 'service_healthy'
|
||||||
env_file:
|
env_file:
|
||||||
- '.env'
|
- '.env'
|
||||||
labels:
|
labels:
|
||||||
|
@ -26,6 +33,11 @@ services:
|
||||||
db:
|
db:
|
||||||
image: 'postgres:13-alpine'
|
image: 'postgres:13-alpine'
|
||||||
restart: 'always'
|
restart: 'always'
|
||||||
|
healthcheck:
|
||||||
|
test: 'pg_isready -U $DB_USERNAME'
|
||||||
|
interval: '10s'
|
||||||
|
timeout: '5s'
|
||||||
|
retries: 5
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
- 'POSTGRES_DB=$DB_DATABASE'
|
- 'POSTGRES_DB=$DB_DATABASE'
|
||||||
|
@ -39,11 +51,15 @@ services:
|
||||||
redis:
|
redis:
|
||||||
image: 'redis:6-alpine'
|
image: 'redis:6-alpine'
|
||||||
restart: 'always'
|
restart: 'always'
|
||||||
|
healthcheck:
|
||||||
|
test: 'redis-cli -h localhost ping'
|
||||||
|
interval: '10s'
|
||||||
|
timeout: '5s'
|
||||||
|
retries: 3
|
||||||
|
|
||||||
labels:
|
labels:
|
||||||
- 'com.centurylinklabs.watchtower.enable=true'
|
- 'com.centurylinklabs.watchtower.enable=true'
|
||||||
|
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
nginx:
|
nginx:
|
||||||
external: true
|
external: true
|
||||||
|
|
Reference in New Issue