Public Repository

Last pushed: 9 months ago
Short Description
Nginx-Server for HTML-DEV using JSON-Templateengine
Full Description

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"
Docker Pull Command
Owner
dockermgeo