nginxtopo

package
v1.4.5 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package nginxtopo resolves on-disk nginx directory topology for projects fronted by another stack's nginx (NGINX_FRONTED_BY / config.NginxConfig. FrontedBy). It has no dependency on internal/config, internal/build, or internal/doctor so any of them can import it without a cycle.

Index

Constants

View Source
const NginxSSLContainerPath = "/etc/nginx/ssl"

ssl_path.go — the one in-container path both the nginx conf generator and the compose service definition must agree on for TLS to actually start.

Purpose: a production box was found with generated nginx confs referencing "/etc/nginx/ssl/certificates/local-nself-org/..." — the generator's literal was correct in isolation, but it and the compose volume mount target ("./ssl:/etc/nginx/ssl:ro") were two independently hand-typed string literals in two different packages (internal/nginx, internal/compose) with nothing forcing them to agree. NginxSSLContainerPath lives here — a package with zero internal dependencies, so both can import it without a cycle — as the single place either would need to change. Inputs: none (a constant). Outputs: NginxSSLContainerPath, the absolute in-container directory nginx's TLS material is mounted at. Constraints: this is the MOUNT TARGET only. The certificate subdirectory name under "<NginxSSLContainerPath>/certificates/" is a second, separate question — see internal/ssl.DomainToDirName, the one implementation of domain-to-directory-name both internal/ssl (which writes the certs) and internal/nginx (which references them) now share.

Variables

This section is empty.

Functions

func ResolveFrontingDir

func ResolveFrontingDir(projectDir, frontedBy string) (dir string, ok bool)

ResolveFrontingDir resolves the directory of the stack named by frontedBy when projectDir is laid out as a subdirectory (conventionally "backend") directly under that stack's own directory.

Example: projectDir ".../nself-web/backend" with frontedBy "nself-web" resolves to ".../nself-web" — the fronting stack's own root. Callers append their own "nginx/..." subpath (e.g. "nginx/sites") to that root.

Types

This section is empty.

Jump to

Keyboard shortcuts

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