1
0

doc: update examples

This commit is contained in:
Konstantin Demin 2024-11-08 14:19:36 +03:00
parent fe1ef64e67
commit 3fa79d3092
Signed by: krd
GPG Key ID: 4D56F87A8BA65FD0
6 changed files with 55 additions and 33 deletions

View File

@ -1,5 +1,9 @@
# simple static site
consult [Dockerfile](Dockerfile) or [docker-compose.yml](docker-compose.yml) - both are simple and fine enough.
---
configuration:
```nginx
@ -8,13 +12,4 @@ server {
}
```
Dockerfile:
```dockerfile
FROM docker.io/rockdrilla/angie-conv:v0.0.5
COPY /site/ /etc/angie/site/
COPY /static/ /etc/angie/static/
```
both are simple and fine enough.
simple as that! :)

View File

@ -0,0 +1,14 @@
version: "3.8"
services:
angie-conv-example-basic:
container_name: angie-conv-example-basic
image: docker.io/rockdrilla/angie-conv:v0.0.5
environment:
NGX_HTTP_NO_PROXY: 1
ports:
- "127.0.0.1:8080:8080"
volumes:
- "./site:/angie/site:ro"
- "./static:/angie/static:ro"

View File

@ -1,16 +1,6 @@
# SSL with subdomains
Dockerfile:
```dockerfile
FROM docker.io/rockdrilla/angie-conv:v0.0.5
COPY /site/ /etc/angie/site/
COPY /static/ /etc/angie/static/
COPY /tls/ /etc/angie/tls/
ENV NGX_HTTP_CONFLOAD='ssl'
```
consult [Dockerfile](Dockerfile) or [docker-compose.yml](docker-compose.yml) - both are simple and fine enough.
---

View File

@ -0,0 +1,16 @@
version: "3.8"
services:
angie-conv-example-ssl:
container_name: angie-conv-example-ssl
image: docker.io/rockdrilla/angie-conv:v0.0.5
environment:
NGX_HTTP_NO_PROXY: 1
NGX_HTTP_CONFLOAD: 'ssl v2'
ports:
- "127.0.0.1:8443:8443"
volumes:
- "./site:/angie/site:ro"
- "./static:/angie/static:ro"
- "./tls:/angie/tls:ro"

View File

@ -1,5 +1,9 @@
# static site with templates
consult [Dockerfile](Dockerfile) or [docker-compose.yml](docker-compose.yml) - both are simple and fine enough.
---
mostly same as [simple static site](../basic/README.md) except environment variable `NGX_PROCESS_STATIC=1`.
configuration:
@ -10,18 +14,6 @@ server {
}
```
Dockerfile:
```dockerfile
FROM docker.io/rockdrilla/angie-conv:v0.0.5
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

View File

@ -0,0 +1,15 @@
version: "3.8"
services:
angie-conv-example-static-template:
container_name: angie-conv-example-static-template
image: docker.io/rockdrilla/angie-conv:v0.0.5
environment:
NGX_HTTP_NO_PROXY: 1
NGX_PROCESS_STATIC: 1
ports:
- "127.0.0.1:8080:8080"
volumes:
- "./site:/angie/site:ro"
- "./static:/angie/static:ro"