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
16 changes: 1 addition & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,8 @@ jobs:
- name: Checkout.
uses: actions/checkout@v5

- name: Docker version.
run: |
docker version
docker compose version

- name: Build and start containers.
run: docker compose up -d --build

- name: Wait for readiness.
run: |
for i in {1..60}; do
if docker exec yii2-apache sh -lc "curl -ksS -o /dev/null -w '%{http_code}' https://localhost | grep -qE '200|302'"; then
echo "Service is ready"; exit 0; fi
sleep 2
done
echo "Service not ready"; docker logs yii2-apache; exit 1
run: docker compose up -d --build --wait

- name: Codeception build.
run: docker exec yii2-apache vendor/bin/codecept build
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
- Bug #180: Update paths to ignore in GitHub Actions workflow for pull requests and pushes (@terabytesoftw)
- Bug #184: Update Docker commands and badge links in `README.md` for accurate workflow status (@terabytesoftw)
- Bug #186: Rename steps for clarity in GitHub Actions workflow `build.yml` (@terabytesoftw)
- Bug #190: Simplify Docker workflow by removing unnecessary steps and adding healthcheck configuration (@terabytesoftw)

## 0.1.0 August 31, 2025

Expand Down
6 changes: 6 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ services:
TZ: "UTC"
YII_DEBUG: "${YII_DEBUG:-false}"
YII_ENV: "${YII_ENV:-prod}"
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost/ || exit 1"]
interval: 10s
timeout: 5s
retries: 5
start_period: 25s
ports:
- '8080:80'
- '8443:443'
Expand Down
Loading