peh (PNDLM Environment Helper) is a tool by PNDLM for building simple, reliable, reusable software development environments based on Docker Stack.
Philosophical goals—
- Minimize pre-requisite installation requirements on dev machines
- Limit custom tooling and abstraction; directly leverage great off-the-shelf tooling wherever possible
- Remain dev/deploy platform agnostic
Components are—
- A Golang CLI library (https://github.com/pndlm/peh/peh3) with common various docker/npm/dev-ops functions, commands and shortcuts
- A
project-template
used to kick off new software project git repositories that are based on peh- Project-specific CLI utility— the template contains a utility app in
/peh/src
that ingests the peh3 library and is customizable to whatever the project needs
- Project-specific CLI utility— the template contains a utility app in
- A global helper utility that allows one to type
peh
at the command-line within any peh project and run its specific CLI utility
Install the base pre-requisites—
- Docker Desktop — https://docs.docker.com/desktop/install
- For Linux, strongly recommend following the Digital Ocean instructions for your distribution
- Go — https://go.dev/dl
Install the global peh
helper on your development machine—
GOPROXY=direct go install github.com/pndlm/peh/helper/peh@latest
# If Go isn't already in your path, add it
# Please interpret for the shell of your choice
echo 'export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin' >> ~/.bashrc
After a shell restart or reboot, you should now be able to run peh
at your command-line to see a list of available commands.
- Copy a fresh
peh
directory into the project:
cd projectdir
npx degit pndlm/peh/project-template/peh peh --force
- Add
use ./peh/src
togo.work
file as necessary - Grep and replace all instances of
pndlm.com/example-project
with a customized name e.g.client.com/appname/peh
- Install dependencies:
cd peh/src
go get github.com/pndlm/peh/peh3
go work sync
To develop and test changes to peh3 library alongside of a consuming project, check out this repository next to your active project and review/uncomment the replace
directive at the bottom of your project's /peh/src/go.mod
file.
- New project creation instructions
# don't forget to install the latest version of the library....
GOPROXY=direct go get github.com/pndlm/peh/peh3
- Add
docker-compose.yaml
andREADME
toproject-template
- Test fully new installation
- Make creating a new installation a command on
peh
helper itself ? - Allow use of both
docker compose
&docker stack
?