2024-09-20 01:27:15 +03:00
|
|
|
# static site with templates
|
|
|
|
|
|
|
|
mostly same as [simple static site](../basic/README.md) except environment variable `NGX_PROCESS_STATIC=1`.
|
|
|
|
|
|
|
|
configuration:
|
|
|
|
|
|
|
|
```nginx
|
|
|
|
server {
|
|
|
|
listen 8080;
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
Dockerfile:
|
|
|
|
|
|
|
|
```dockerfile
|
2024-09-30 20:56:15 +03:00
|
|
|
FROM docker.io/rockdrilla/angie-conv:v0.0.2
|
2024-09-20 01:27:15 +03:00
|
|
|
|
|
|
|
COPY /site/ /etc/angie/site/
|
|
|
|
COPY /static/ /etc/angie/static/
|
|
|
|
|
|
|
|
## instruct entrypoint to process static/ - unroll *.j2 templates, etc.
|
|
|
|
ENV NGX_PROCESS_STATIC=1
|
|
|
|
```
|
|
|
|
|
|
|
|
Also note that there's no `index.html` but `index.html.j2`:
|
|
|
|
|
|
|
|
```jinja
|
|
|
|
<hmtl>
|
|
|
|
<body>
|
|
|
|
<h1>Hello World</h1>
|
|
|
|
This image is powered by Angie {{ env.ANGIE_VERSION }} and Python {{ env.PYTHON_VERSION }}.
|
|
|
|
</body>
|
|
|
|
</hmtl>
|
|
|
|
```
|