Skip to content

Fix dependabot alert #37

Fix dependabot alert

Fix dependabot alert #37

Workflow file for this run

name: Docker
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
jobs:
build_and_run_docker:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and run with Docker Compose
run: |
touch ./service/.env
docker compose up --build -d
sleep 10
- name: Check frontend accessible
run: |
response=$(curl -s -o /dev/null -w "%{http_code}" http://localhost:3000)
if [[ "$response" == "200" ]]; then
echo "Application launched successfully"
else
echo "Application failed to launch"
exit 1
fi
- name: Check backend accessible
run: |
response=$(curl -s -o /dev/null -w "%{http_code}" http://localhost:5000/health)
if [[ $response == "200" ]]; then
echo "Health check passed"
else
echo "Health check failed with status code $response"
exit 1
fi
- name: Cleanup
if: always()
run: docker compose down