0.1.0-alpha.03fcf9a2 • Published 6 years ago

required-runtime-html v0.1.0-alpha.03fcf9a2

Weekly downloads
1
License
MIT
Repository
-
Last release
6 years ago

Required-runtime-static-html

required-runtime-static-html is a small cli tool that can be used to inject a <script> tag into the head of a static file

Docker

Docker is a great tool for building an immutable container which can be used in multiple environments with different environment variables.

Unfortunately static websites do not get this benefit unless you do some fancy tricks

required-runtime-static-html solves this by having the container modify its contents itself on startup, keeping the overall container immutable

Simply change your start script to include required-runtime-static-html

startup.sh

required-runtime-static-html ./public/index.html --required=KEY1,KEY2,KEY3
** The ENTRYPOINT/CMD of your application **
``

Dockerfile

RUN npm install -g required-runtime-static-html CMD "startup.sh"