fix: added help check #123
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: API + DB Setup | |
on: [push] | |
jobs: | |
api: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "20" | |
cache: "npm" | |
- name: Create ENV file | |
run: cp -f ./.docker/env.docker .env | |
- name: Help 1 | |
run: docker compose --help | |
- name: Clean containers | |
run: make clean | |
- name: Build containers (db, db_setup, api) | |
run: make build-backend | |
- name: Run database container | |
run: docker-compose -f docker-compose.yml up -d critterbase-db | |
- name: Run database setup container | |
run: docker-compose -f docker-compose.yml up --exit-code-from critterbase-db_setup | |
- name: Run API container | |
run: docker-compose -f docker-compose.yml up -d critterbase-api | |
- name: Check database health | |
uses: stringbean/docker-healthcheck-action@v1 | |
with: | |
container: db-critterbase | |
wait-time: 50 | |
require-status: running | |
require-healthy: true | |
- name: Log database setup | |
if: always() | |
run: docker logs db-setup-critterbase -f | |
- name: Check API running | |
uses: stringbean/docker-healthcheck-action@v1 | |
with: | |
container: api-critterbase | |
wait-time: 50 | |
require-status: running |