This is an example of a staffing service for a fictional consulting company. It is an implementation of Domain Driven Design and Clean Architecture.
The structure of the service is based off github.com/marcusolsson/goddd by Marcus Olsson.
# Clone the repository
gh repo clone brittonhayes/staffing
# Run the service with default settings
go run ./cmd/staffd/main.go
The service can be run with a few different customization options. These options can be set with environment variables or command line flags.
# OR run the service with in-memory storage and debug logging
go run ./cmd/staffd/main.go -storage inmem -debug
# OR run the service with sqlite storage and debug logging
go run ./cmd/staffd/main.go -storage sqlite -debug
# Build the image
docker build -t ghcr.io/brittonhayes/staffing:latest .
# Run the image
docker run ghcr.io/brittonhayes/staffing:latest
You can run with docker-compose see how the service integrates with external metrics or storage services like prometheus or postgres.
# Run the service with docker-compose
docker-compose up
# Clone the repository
gh repo clone brittonhayes/staffing
cd ./staffing
# Checkout to a new branch
git checkout -b feat/my-new-feature
# Commit your changes
git commit -am "feat:Add some feature"
# Create a PR
gh pr create -w