Sign inSign up

dockermgeo/helloworld-nginx

By dockermgeo

Updated almost 9 years ago

Nginx-Server for HTML-DEV using JSON-Templateengine

Image
0

138

dockermgeo/helloworld-nginx repository overview

Using Simple mgeoTemplateJsonengine for editing

  • HTML-Files
  • config-Files
  • ...

in Startup-Process.

If any defined ENV are missing, containerstart will exiting!

Steps for Templatengine
  1. Create Templatefile
  2. Define Placeholder in JSON-File
  3. Fill ENV-Variables at Startup
1. Template
 < h1 >Hallo %%ENV_FIRSTNAME%%!< /h1 >
2. JSON

JSON: envreplace.json

[
 {
   'template':'/src/index.tpl.html',
   'target':'/usr/share/nginx/html/index.html',
   'set':[ "ENV_FIRSTNAME", "ENV_LASTNAME", "ENV_STREET", "ENV_PLACE" ]
  },
  {....}
]
3. Startup

docker-compose.yml

ngixweb:
  image: dockermgeo/helloworld-nginx
  ports:
    - "3200:80"
  environment:
    - ENV_FIRSTNAME=Moby
    - ENV_LASTNAME="Docker"
    - ENV_STREET="Containerroad 1"
    - ENV_PLACE="007 Cloud"

Tag summary

Content type

Image

Digest

Size

83 MB

Last updated

almost 9 years ago

docker pull dockermgeo/helloworld-nginx