From 3fa79d30927472b054ad15a1cac744d07c50cda1 Mon Sep 17 00:00:00 2001 From: Konstantin Demin Date: Fri, 8 Nov 2024 14:19:36 +0300 Subject: [PATCH] doc: update examples --- doc/examples/basic/README.md | 15 +++++---------- doc/examples/basic/docker-compose.yml | 14 ++++++++++++++ doc/examples/ssl/README.md | 12 +----------- doc/examples/ssl/docker-compose.yml | 16 ++++++++++++++++ doc/examples/static-template/README.md | 16 ++++------------ doc/examples/static-template/docker-compose.yml | 15 +++++++++++++++ 6 files changed, 55 insertions(+), 33 deletions(-) create mode 100644 doc/examples/basic/docker-compose.yml create mode 100644 doc/examples/ssl/docker-compose.yml create mode 100644 doc/examples/static-template/docker-compose.yml diff --git a/doc/examples/basic/README.md b/doc/examples/basic/README.md index 8a38acc..3a52697 100644 --- a/doc/examples/basic/README.md +++ b/doc/examples/basic/README.md @@ -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! :) diff --git a/doc/examples/basic/docker-compose.yml b/doc/examples/basic/docker-compose.yml new file mode 100644 index 0000000..fb16607 --- /dev/null +++ b/doc/examples/basic/docker-compose.yml @@ -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" diff --git a/doc/examples/ssl/README.md b/doc/examples/ssl/README.md index bc2c1f8..401df8b 100644 --- a/doc/examples/ssl/README.md +++ b/doc/examples/ssl/README.md @@ -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. --- diff --git a/doc/examples/ssl/docker-compose.yml b/doc/examples/ssl/docker-compose.yml new file mode 100644 index 0000000..608572d --- /dev/null +++ b/doc/examples/ssl/docker-compose.yml @@ -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" diff --git a/doc/examples/static-template/README.md b/doc/examples/static-template/README.md index ef15485..5497f79 100644 --- a/doc/examples/static-template/README.md +++ b/doc/examples/static-template/README.md @@ -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 diff --git a/doc/examples/static-template/docker-compose.yml b/doc/examples/static-template/docker-compose.yml new file mode 100644 index 0000000..7c4c43b --- /dev/null +++ b/doc/examples/static-template/docker-compose.yml @@ -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"