Skip to content

pndlm/peh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

peh3

peh (PNDLM Environment Helper) is a tool by PNDLM for building simple, reliable, reusable software development environments based on Docker Compose & Swarm.

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
  • A global helper utility that allows one to type peh at the command-line within any peh project and run its specific CLI utility

Setup

Install the base pre-requisites—

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.

Adding peh3 to an existing peh2 or other webapp project

  • Copy a fresh peh directory into the project:
cd your-project-directory

# with npm—
npx degit pndlm/peh/project-template/peh peh --force
# or with pnpm—
pnpm dlx degit pndlm/peh/project-template/peh peh --force

# if you have a go.work file—
go work use peh
  • Grep and replace all instances of pndlm.com/example-project/peh with a customized name e.g. client.com/appname/peh
  • In peh.go replace example-project with a customized name e.g. client-app-name
  • Install dependencies:
cd peh
GOPROXY=direct go get github.com/pndlm/peh/peh3@latest
go work sync

Developing on peh3 library

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, e.g.—

replace github.com/pndlm/peh/peh3 => ../../../peh/peh3

WIP

  • New project creation instructions
# don't forget to install the latest version of the library....
GOPROXY=direct go get github.com/pndlm/peh/peh3@latest
  • Add docker-compose.yaml and README to project-template
  • Test fully new installation
  • Make creating a new installation a command on peh helper itself ?
  • Allow use of both docker compose & docker stack ?

About

PNDLM Environment Helper v3

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages