mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2026-07-31 15:59:34 -04:00
- Replaced the All-in-One (AIO) deployment setup with a Standard Deployment configuration, introducing .env.advanced.example for advanced settings. - Updated .dockerignore to reflect the new environment file structure. - Removed .env.aio.example and associated references from documentation and workflows. - Enhanced installation instructions to clarify the new Standard Deployment process. - Updated GitHub Actions workflows to align with the new deployment structure, including smoke tests and image builds. - Improved documentation for environment variable references and deployment options.
66 lines
1.8 KiB
YAML
66 lines
1.8 KiB
YAML
name: Compose Smoke Test
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- 'backend/**'
|
|
- 'docker/aio/**'
|
|
- 'frontend/**'
|
|
- 'docker/**'
|
|
- '.github/workflows/compose-smoke-test.yml'
|
|
push:
|
|
branches:
|
|
- main
|
|
- development
|
|
paths:
|
|
- 'backend/**'
|
|
- 'docker/aio/**'
|
|
- 'frontend/**'
|
|
- 'docker/**'
|
|
- '.github/workflows/compose-smoke-test.yml'
|
|
|
|
jobs:
|
|
aio-smoke:
|
|
name: Standard Deployment compose smoke test
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 45
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Build Standard Deployment image
|
|
run: |
|
|
docker build -f docker/Dockerfile --target aio -t adventurelog-smoke .
|
|
SIZE=$(docker image inspect adventurelog-smoke --format='{{.Size}}')
|
|
echo "Standard Deployment image size: $(awk "BEGIN {printf \"%.1f MB\", ${SIZE}/1024/1024}")"
|
|
|
|
- name: Start Standard Deployment stack
|
|
run: |
|
|
printf '%s\n' 'POSTGRES_PASSWORD=smoke-test-pass' > .env
|
|
docker compose --env-file .env -f docker/docker-compose.yml up -d --wait
|
|
|
|
- name: Wait for health endpoint
|
|
run: |
|
|
for i in $(seq 1 60); do
|
|
if curl -fsS http://localhost:8015/health; then
|
|
exit 0
|
|
fi
|
|
sleep 5
|
|
done
|
|
echo "Health check failed"
|
|
docker compose --env-file .env -f docker/docker-compose.yml ps
|
|
docker compose --env-file .env -f docker/docker-compose.yml logs
|
|
exit 1
|
|
|
|
- name: Tear down
|
|
if: always()
|
|
run: |
|
|
printf '%s\n' 'POSTGRES_PASSWORD=smoke-test-pass' > .env
|
|
docker compose --env-file .env -f docker/docker-compose.yml down -v
|