/nginx-containers

nginx containers build and push

Primary LanguageShellApache License 2.0Apache-2.0

nginx-containers

helper scripts for building nginx

the examples are meant to build the following nginx containers

requires

  • docker
  • vault

the following certs either in certs/ or in your vault secret

  • repo access
    • certs/nginx-repo.crt
    • certs/nginx-repo.key
  • default tls cert to use
    • certs/nginx-default.crt
    • certs/nginx-default.key

if you don't have a default cert you can run:

. init.sh
new_cert myhost.domain.com

if you don't have a vault you can run: local-vault

building images

. init.sh
menu
#build_nginx [registry] [type] [tag] [secret]
build_nginx registry.domain.com/nginx-plus latest mynginx-secret

Development

devcontainer

includes:

  • pre-commit
  • go
  • docker
  • terraform
  • terraform-docs

git

don't forget to add your git user config

git config --global user.name "myuser"
git config --global user.email "myuser@domain.com"

pre-commit

checking for secrets as well as linting is performed by git pre-commit with the module requirements handled in the devcontainer.

testing pre-commit hooks:

# test pre commit manually
pre-commit run -a -v
# use it from a helper
. init.sh
pre_commit