Files
my-protfolio/DEPLOYMENT.md
Amirhossein Khalili 463e72a404 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.
2026-09-06 15:01:56 +03:30

24 lines
830 B
Markdown

# 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.