Skip to content

Commit

Permalink
Feature/healthcheck in docker-compose.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcelWildenburg committed Sep 27, 2024
1 parent febceb1 commit 5cfe42f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ To do a manual deployment to staging though, run `npm run build` to produce the
## Environment-specific configuration
To enable environment-specific configuration without having to create a separate artifact per environment or resort to running a dedicated node server or container, a config.js file is used.

This config.js is loaded in index.html using a regular <script> tag. It is therefore not compiled with the application (like external configuration should be). For development (local) the file is listed in angular.json as a asset. Therefore the default config.js is available when running `ng serve`. When building a production version however, config.js is not output. Per environment, a config.js should be deployed together with the created artifact's files, this enabling per-environment configuration while deploying the application as a static resource (suitable for CDNs).
This config.js is loaded in index.html using a regular `<script>` tag. It is therefore not compiled with the application (like external configuration should be). For development (local) the file is listed in angular.json as a asset. Therefore the default config.js is available when running `ng serve`. When building a production version however, config.js is not output. Per environment, a config.js should be deployed together with the created artifact's files, this enabling per-environment configuration while deploying the application as a static resource (suitable for CDNs).

## Further help

Expand Down
8 changes: 7 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,16 @@ services:
MYSQL_ROOT_PASSWORD: littil
ports:
- "3306:3306"
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
interval: 5s
timeout: 5s
retries: 5
backend:
image: ghcr.io/devoxx4kids-npo/littil-backend:${LITTIL_BACKEND_VERSION:-latest}
depends_on:
- dbhost
dbhost:
condition: service_healthy
environment:
- QUARKUS_BANNER_ENABLED=true
- CLOUDWATCH_ENABLED=false
Expand Down

0 comments on commit 5cfe42f

Please sign in to comment.