The /config
directory, also often named contrib
, stores all configurations of any kind such as…
- …container orchestration deployments — tools like Automated scaling and management systems like Kubernetes or Docker Compose as well as tools to manage and process their configurations like Kustomize and Helm.
- …application configuration templates — reference, example or starter files that contain default values configurations of applications in the
/apps
directory. - …platform and distribution specific configurations — basic, platform specific configuration files for distribution or deployment purposes like for example systemd units, process managers/supervisors or reverse proxies.
The files should be placed in separate directories based on their purpose or target technology. Please see the example below for a common and practical usage pattern.
Given the example of the /api
directory the structure for some common configurations could be created as follows:
config
├─ apps
│ └─ notes
├─ deployment
│ ├─ docker
│ │ └─ compose
│ └─ k8s
│ ├─ base
│ ├─ local
│ ├─ development
│ └─ production
├─ packaging
│ ├─ linux
│ │ ├─ arch
│ │ ├─ deb
│ │ └─ flatpak
│ └─ macos
│ ├─ homebrew
│ └─ pkg
├─ platform
│ ├─ nomad
│ └─ systemd
└─ security
├─ certs
└─ secrets
Next to the experience with own projects and golang-standards/project-layout, many other large, production-grade and well-known projects of the Go ecosystem have been used as references: