initial commit
This commit is contained in:
4
doc/examples/static-template/Dockerfile
Normal file
4
doc/examples/static-template/Dockerfile
Normal file
@@ -0,0 +1,4 @@
|
||||
FROM docker.io/rockdrilla/angie-conv:v0.0.1
|
||||
|
||||
COPY /site/ /etc/angie/site/
|
||||
COPY /static/ /etc/angie/static/
|
26
doc/examples/static-template/README.md
Normal file
26
doc/examples/static-template/README.md
Normal file
@@ -0,0 +1,26 @@
|
||||
# static site with templates
|
||||
|
||||
consult [Dockerfile](Dockerfile) or [docker-compose.yml](docker-compose.yml) - both are simple and fine enough.
|
||||
|
||||
---
|
||||
|
||||
same as [simple static site](../basic/README.md).
|
||||
|
||||
configuration:
|
||||
|
||||
```nginx
|
||||
server {
|
||||
listen 8080;
|
||||
}
|
||||
```
|
||||
|
||||
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 {% if env.NGX_PRO == '1' %}PRO{% else %}OSS{% endif %} {{ env.ANGIE_VERSION }} and Python {{ env.PYTHON_VERSION }}.
|
||||
</body>
|
||||
</hmtl>
|
||||
```
|
12
doc/examples/static-template/docker-compose.yml
Normal file
12
doc/examples/static-template/docker-compose.yml
Normal file
@@ -0,0 +1,12 @@
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
|
||||
angie-conv-example-static-template:
|
||||
container_name: angie-conv-example-static-template
|
||||
image: docker.io/rockdrilla/angie-conv:v0.0.1
|
||||
ports:
|
||||
- "127.0.0.1:8080:8080"
|
||||
volumes:
|
||||
- "./site:/angie/site:ro"
|
||||
- "./static:/angie/static:ro"
|
3
doc/examples/static-template/site/http-site.conf
Normal file
3
doc/examples/static-template/site/http-site.conf
Normal file
@@ -0,0 +1,3 @@
|
||||
server {
|
||||
listen 8080;
|
||||
}
|
6
doc/examples/static-template/static/index.html.j2
Normal file
6
doc/examples/static-template/static/index.html.j2
Normal file
@@ -0,0 +1,6 @@
|
||||
<html>
|
||||
<body>
|
||||
<h1>Hello World</h1>
|
||||
This image is powered by Angie {% if env.NGX_PRO == '1' %}PRO{% else %}OSS{% endif %} {{ env.ANGIE_VERSION }} and Python {{ env.PYTHON_VERSION }}.
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user