chore: add Docker deployment behind Caddy

Build the static Next.js export in a reproducible container and expose it
through the existing Caddy network and upstream service name.
This commit is contained in:
2026-09-06 15:01:56 +03:30
parent e45a2fc14a
commit 463e72a404
5 changed files with 115 additions and 0 deletions

23
DEPLOYMENT.md Normal file
View File

@@ -0,0 +1,23 @@
# Deployment
This project builds the Next.js static export in a Node container and serves the
generated files from Nginx on port 80. The container joins the existing
`caddy_proxy` Docker network under the `static-site` service name expected by
Caddy.
## Deploy or update
From the project directory on the server, run:
```sh
docker compose up --build -d
```
The external `caddy_proxy` network must already exist and Caddy must be attached
to it. No host port is published because Caddy is the public entry point and
terminates TLS for `amiirkhl.ir` and `www.amiirkhl.ir`.
If the previous `static-site` container was created from a different Compose
project directory, remove that old stack once before the first deployment to
avoid a Docker container-name conflict. Updates from this project then use only
the command above.