diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml
index 5b58b41..8f25ac3 100644
--- a/.github/workflows/docker.yml
+++ b/.github/workflows/docker.yml
@@ -1,48 +1,62 @@
-name: Docker
+name: "Docker"
on:
+ workflow_dispatch:
+
push:
- branches: master
+ branches: ["master"]
+
+ schedule:
+ - cron: "0 8 * * 1"
permissions:
contents: read
jobs:
- docker:
- runs-on: ubuntu-latest
-
- name: Docker (dockette/expose)
+ test:
+ name: "Test"
+ runs-on: "ubuntu-latest"
steps:
- - name: Checkout
+ - name: "Checkout"
uses: actions/checkout@v4
- - name: Login to DockerHub
- uses: docker/login-action@v3
- with:
- username: ${{ secrets.DOCKERHUB_USERNAME }}
- password: ${{ secrets.DOCKERHUB_TOKEN }}
-
- - name: Set up QEMU
- uses: docker/setup-qemu-action@v3
-
- - name: Set up Docker Buildx
+ - name: "Set up Docker Buildx"
uses: docker/setup-buildx-action@v3
- - name: Cache Docker layers
- uses: actions/cache@v4
+ - name: "Build image"
+ uses: docker/build-push-action@v6
with:
- path: /tmp/.buildx-cache
- key: ${{ runner.os }}-buildx-${{ github.sha }}
- restore-keys: |
- ${{ runner.os }}-buildx-
+ context: "."
+ load: true
+ tags: "dockette/expose"
+
+ - name: "Test image"
+ run: "make test"
+
+ build:
+ name: "Build"
+ needs: ["test"]
+ uses: dockette/.github/.github/workflows/docker.yml@master
+ secrets: inherit
+ with:
+ image: "dockette/expose"
+ tag: "latest"
+ context: "."
+
+ docs:
+ name: "Docs"
+ runs-on: "ubuntu-latest"
+ needs: ["build"]
+ if: github.ref == 'refs/heads/master'
- - name: Build and push
- uses: docker/build-push-action@v6
+ steps:
+ - name: "Checkout"
+ uses: actions/checkout@v4
+
+ - name: "Update Docker Hub description"
+ uses: peter-evans/dockerhub-description@v5
with:
- context: .
- push: true
- tags: dockette/expose
- cache-from: type=local,src=/tmp/.buildx-cache
- cache-to: type=local,dest=/tmp/.buildx-cache
- platforms: linux/amd64,linux/arm64
+ username: ${{ secrets.DOCKERHUB_USERNAME }}
+ password: ${{ secrets.DOCKERHUB_TOKEN }}
+ repository: "dockette/expose"
diff --git a/AGENTS.md b/AGENTS.md
new file mode 100644
index 0000000..1a2f173
--- /dev/null
+++ b/AGENTS.md
@@ -0,0 +1,37 @@
+# AGENTS.md
+
+## Project
+
+Dockette Expose builds `dockette/expose`, a Dockerized Beyond Code Expose server/client for sharing local sites through secure tunnels. The image installs PHP 8.0, Composer, Expose `1.5.1`, custom PHP config, and the repository entrypoint.
+
+## Image
+
+- Default image: `dockette/expose:latest`.
+- Build context: repository root `.` with `Dockerfile`, `entrypoint.sh`, `config.php`, and `php.ini`.
+- Base image: `dockette/debian:buster`.
+- `make build` uses Docker Buildx and `${DOCKER_PLATFORMS:-linux/amd64,linux/arm64}`.
+- Runtime defaults are set by `EXPOSE_HOST`, `EXPOSE_PORT`, `EXPOSE_USERNAME`, `EXPOSE_PASSWORD`, `EXPOSE_TOKEN`, `EXPOSE_ADMIN`, and `EXPOSE_DB`.
+- GitHub Actions builds a local test image, runs `make test`, then publishes `latest` through the shared Dockette Docker workflow on `master` and the weekly schedule.
+
+## Commands
+
+- `make build` builds `${DOCKER_IMAGE}:${DOCKER_TAG}` with Buildx.
+- `make docker-build` performs a local `docker build --pull` without Buildx.
+- `make test` runs `expose --version` in the image.
+- `make run` starts the server on `8000:8000`.
+- `make example-install`, `make example-app`, and `make example-share` support the local PHP example.
+
+## Testing Notes
+
+- Use `make docker-build test` for a local single-platform validation before runtime testing.
+- Use `make -n build test run` to dry-run command wiring without requiring Docker.
+- Full server/client testing needs Docker networking, a reachable `EXPOSE_HOST`, and an available mapped port.
+
+## Guidelines
+
+- Keep `Dockerfile`, `entrypoint.sh`, `config.php`, `php.ini`, README environment documentation, and `.github/workflows/docker.yml` aligned.
+- Prefer `DOCKER_*` names for Docker-related Makefile variables.
+- Place `.PHONY: