Skip to content

Commit

Permalink
feat: added healthcheck on jobs
Browse files Browse the repository at this point in the history
Closes #60
  • Loading branch information
claustres committed May 15, 2019
1 parent 73ac290 commit bdcb19e
Show file tree
Hide file tree
Showing 11 changed files with 76 additions and 3 deletions.
1 change: 1 addition & 0 deletions .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ AUTH_USER=your authentication identity to access the services
AUTH_PASSWORD=your authentication password to access the services. It must be encrypted in SHA1
SECRET=the secret key to generete JWT. It used by the applications KANO/WEACAST
DB_URL=mongodb://mongodb:27017/kargo
SLACK_WEBHOOK_URL=url to post alerts on slack

# S3 configuration
S3_ACCESS_KEY=your access key id to access S3
Expand Down
8 changes: 8 additions & 0 deletions deploy/arome-france-high-loader.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ services:
image: ${AROME_FRANCE_HIGH_LOADER_IMAGE}:${AROME_FRANCE_HIGH_LOADER_TAG}
environment:
- DB_URL=${WEACAST_LOADERS_DB_URL}
- SUBDOMAIN
- SLACK_WEBHOOK_URL
healthcheck:
test: ["CMD", "node", "./healthcheck.js", "--success-rate", "0.75", --link-template", "\"portainer.<%= SUBDOMAIN %>\""]
interval: 1m
timeout: 10s
retries: 3
start_period: 1m
networks:
- kargo-network
deploy:
Expand Down
8 changes: 8 additions & 0 deletions deploy/arome-france-loader.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ services:
image: ${AROME_FRANCE_LOADER_IMAGE}:${AROME_FRANCE_LOADER_TAG}
environment:
- DB_URL=${WEACAST_LOADERS_DB_URL}
- SUBDOMAIN
- SLACK_WEBHOOK_URL
healthcheck:
test: ["CMD", "node", "./healthcheck.js", "--success-rate", "0.75", --link-template", "\"portainer.<%= SUBDOMAIN %>\""]
interval: 1m
timeout: 10s
retries: 3
start_period: 1m
networks:
- kargo-network
deploy:
Expand Down
8 changes: 8 additions & 0 deletions deploy/arpege-europe-loader.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ services:
image: ${ARPEGE_EUROPE_LOADER_IMAGE}:${ARPEGE_EUROPE_LOADER_TAG}
environment:
- DB_URL=${WEACAST_LOADERS_DB_URL}
- SUBDOMAIN
- SLACK_WEBHOOK_URL
healthcheck:
test: ["CMD", "node", "./healthcheck.js", "--success-rate", "0.75", --link-template", "\"portainer.<%= SUBDOMAIN %>\""]
interval: 1m
timeout: 10s
retries: 3
start_period: 1m
networks:
- kargo-network
deploy:
Expand Down
8 changes: 8 additions & 0 deletions deploy/arpege-world-loader.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ services:
image: ${ARPEGE_WORLD_LOADER_IMAGE}:${ARPEGE_WORLD_LOADER_TAG}
environment:
- DB_URL=${WEACAST_LOADERS_DB_URL}
- SUBDOMAIN
- SLACK_WEBHOOK_URL
healthcheck:
test: ["CMD", "node", "./healthcheck.js", "--success-rate", "0.75", --link-template", "\"portainer.<%= SUBDOMAIN %>\""]
interval: 1m
timeout: 10s
retries: 3
start_period: 1m
networks:
- kargo-network
deploy:
Expand Down
2 changes: 1 addition & 1 deletion deploy/mongodb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ services:
interval: 30s
timeout: 10s
retries: 3
start_period: 1m
start_period: 1m
deploy:
replicas: 1
placement:
Expand Down
8 changes: 8 additions & 0 deletions deploy/openaq.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ services:
image: ${OPENAQ_IMAGE}:${OPENAQ_TAG}
environment:
- DB_URL=${OPENAQ_DB_URL}
- SUBDOMAIN
- SLACK_WEBHOOK_URL
healthcheck:
test: ["CMD", "node", "./healthcheck.js", "--link-template", "\"portainer.<%= SUBDOMAIN %>\""]
interval: 1m
timeout: 10s
retries: 3
start_period: 1m
deploy:
replicas: 1
placement:
Expand Down
8 changes: 8 additions & 0 deletions deploy/teleray.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ services:
- S3_ACCESS_KEY=${S3_ACCESS_KEY}
- S3_SECRET_ACCESS_KEY=${S3_SECRET_ACCESS_KEY}
- S3_BUCKET=${TELERAY_S3_BUCKET}
- SUBDOMAIN
- SLACK_WEBHOOK_URL
healthcheck:
test: ["CMD", "node", "./healthcheck.js", "--link-template", "\"portainer.<%= SUBDOMAIN %>\""]
interval: 1m
timeout: 10s
retries: 3
start_period: 1m
deploy:
replicas: 1
placement:
Expand Down
8 changes: 8 additions & 0 deletions deploy/vigicrues-observations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ services:
image: ${VIGICRUES_OBSERVATIONS_IMAGE}:observations-${VIGICRUES_OBSERVATIONS_TAG}
environment:
- DB_URL=${VIGICRUES_DB_URL}
- SUBDOMAIN
- SLACK_WEBHOOK_URL
healthcheck:
test: ["CMD", "node", "./healthcheck.js", "--link-template", "\"portainer.<%= SUBDOMAIN %>\""]
interval: 1m
timeout: 10s
retries: 3
start_period: 1m
deploy:
replicas: 1
placement:
Expand Down
10 changes: 9 additions & 1 deletion deploy/vigicrues-sections.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,15 @@ services:
sections:
image: ${VIGICRUES_SECTIONS_IMAGE}:sections-${VIGICRUES_SECTIONS_TAG}
environment:
- DB_URL=${VIGICRUES_DB_URL}
- DB_URL=${VIGICRUES_DB_URL}
- SUBDOMAIN
- SLACK_WEBHOOK_URL
healthcheck:
test: ["CMD", "node", "./healthcheck.js", "--link-template", "\"portainer.<%= SUBDOMAIN %>\""]
interval: 1m
timeout: 10s
retries: 3
start_period: 1m
deploy:
replicas: 1
placement:
Expand Down
10 changes: 9 additions & 1 deletion deploy/vigicrues-stations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,15 @@ services:
stations:
image: ${VIGICRUES_STATIONS_IMAGE}:stations-${VIGICRUES_STATIONS_TAG}
environment:
- DB_URL=${VIGICRUES_DB_URL}
- DB_URL=${VIGICRUES_DB_URL}
- SUBDOMAIN
- SLACK_WEBHOOK_URL
healthcheck:
test: ["CMD", "node", "./healthcheck.js", "--link-template", "\"portainer.<%= SUBDOMAIN %>\""]
interval: 1m
timeout: 10s
retries: 3
start_period: 1m
deploy:
replicas: 1
placement:
Expand Down

0 comments on commit bdcb19e

Please sign in to comment.