Deploy
The build is a folder of plain HTML, CSS and images, with no PHP left to run. Deploying it means building a zip and uploading it to a static host.
Build
With the containers running, build the site and zip it:
composer build:zip
You get dist/, with every page as its own
index.html, and dist.zip beside it
at the root of the repo.
docker compose up --build first.
Upload
Most static hosts take a zip or a folder straight from your
browser. Upload dist.zip, or drag in the
dist/ folder, and the site is live. To update it,
build again and upload the new one.
| Host | Where to upload |
|---|---|
| AWS Amplify |
Create an app that deploys without a Git provider, then
drop in dist.zip.
Deploy to AWS Amplify
has the details.
|
| Netlify |
Drag the dist/ folder onto Netlify Drop, or
onto a site's Deploys page.
|
| Cloudflare Pages |
Create a project with Direct Upload, then drop in
dist.zip or the dist/ folder.
|
| Your own server |
Copy what is in dist/ to the site's web
root, over SFTP or with rsync.
|
Uploading by hand is also the quickest way to put a preview in front of a client. Send them the host's URL, and upload again after each round of changes.
Serve the 404 page
The build writes the 404 page to dist/404.html,
the name most hosts look for. Netlify and Cloudflare Pages
serve it for missing pages on their own. AWS Amplify needs one
rewrite rule, which
Serve the 404 page
covers. On your own server, point the web server at it:
error_page 404 /404.html;
ErrorDocument 404 /404.html
Deploy on every push
The build is one command, so it also fits in a CI pipeline.
Start the containers, run
composer build:zip, and hand
dist.zip or dist/ to your host's
deploy step. This site deploys from GitHub Actions on every
push to main, and
Auto-deploy
walks through that workflow for AWS Amplify.