Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 9 additions & 14 deletions .github/workflows/docker-compose-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@ jobs:

- name: Wait for services to be healthy
run: |
echo "Waiting for all services to be healthy..."
# Wait for services with health checks to be healthy (4 services) and all services to be up
timeout 300 bash -c 'until [ $(docker compose ps --format "{{.Health}}" | grep -c "healthy") -ge 4 ] && [ $(docker compose ps --format "{{.Status}}" | grep -c "Up") -ge 5 ]; do sleep 5; done'
echo Pausing for 60s to allow services to start
sleep 60
docker compose ps

- name: Test dashboard endpoints
Expand All @@ -37,23 +36,19 @@ jobs:
run: |
# Test sticker award API with sample user data
curl -f -X GET "http://localhost:8080/api/award/v1/users/user-001/stickers" || exit 1
# TODO!
# curl -f -X GET "http://localhost:8080/api/users/v1/health" || exit 1
curl -f -X GET "http://localhost:8080/api/users/v1/health" || exit 1

- name: Show service logs on failure
if: failure()
run: |
echo "=== Docker Compose Services Status ==="
docker compose ps
echo "=== Traefik Logs ==="
docker compose logs traefik
echo "=== Sticker Award Logs ==="
docker compose logs sticker-award
echo "=== User Management Logs ==="
docker compose logs user-management
echo "=== Database Logs ==="
docker compose logs sticker-award-db
docker compose logs user-management-db
echo "=== All Service Logs ==="
docker compose logs --tail=50
echo "=== Health Check Details ==="
docker compose ps --format "table {{.Name}}\t{{.Status}}\t{{.Health}}"
echo "=== Resource Usage ==="
docker stats --no-stream

- name: Cleanup
if: always()
Expand Down
5 changes: 5 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,11 @@ services:
QUARKUS_S3_AWS_CREDENTIALS_STATIC_PROVIDER_SECRET_ACCESS_KEY: minioadmin
QUARKUS_S3_PATH_STYLE_ACCESS: "true"
STICKER_IMAGES_BUCKET: sticker-images
healthcheck:
Comment thread
scottgerring marked this conversation as resolved.
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
interval: 10s
timeout: 5s
retries: 5
labels:
- "traefik.enable=true"
- "traefik.http.routers.sticker-award.rule=PathPrefix(`/api/award`)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ RUN dotnet restore src/Stickerlandia.UserManagement.Api/Stickerlandia.UserManage
COPY . ./

# Publish the application
RUN dotnet publish src/Stickerlandia.UserManagement.Api/Stickerlandia.UserManagement.Api.csproj -o out -c Release -r linux-arm64
Comment thread
jeastham1993 marked this conversation as resolved.
RUN dotnet publish src/Stickerlandia.UserManagement.Api/Stickerlandia.UserManagement.Api.csproj -o out -c Release

FROM mcr.microsoft.com/dotnet/aspnet:8.0-noble-chiseled AS runtime
WORKDIR /App
Expand Down
Loading