lux

package module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 16, 2022 License: MIT Imports: 5 Imported by: 0

README

Lux

Setup script that generates NGINX configuration from folder structure

Usage

Lux is nginx docker image with lux binary. It accepts three parameters:

  • templates -- path to templates. One of they must name nginx.conf and it is main configuration file.
  • projects -- path to folder with project folders. All projects must have lux.yaml files with variables and template name.
  • output -- config output directory.

Also lux accept exec parameter for execve nginx to no-daemon mod after successful config building. Also you can use multi-stage builds (just copy config directory and projects dirs into the same directories).

For example, see this repository and Dockerfile

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseTemplates

func ParseTemplates(templatesPath string) (*template.Template, error)

Types

type Lux

type Lux struct {
	Projects   []string
	ConfigPath string
	Templates  *template.Template
}

func New

func New(projects []string, templates *template.Template, configPath string) (*Lux, error)

func (*Lux) RootConfig

func (l *Lux) RootConfig() string

type Project

type Project map[string]interface{}

func (Project) TemplateName

func (p Project) TemplateName() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL