Codebase Management

  • Git Branches — main, dev, feature branches
  • When beginning work on a new ticket, make a new feature branch off of dev. The branch name and the commit message must include the JIRA ticket number as the first part of the name. For multiple commits on the same feature branch, continue to prepend ticket numbers in subsequent commit messages.
  • Hot fixes should have HOTFIX as the first part of the commit message
  • When performing work outside of a sprint’s scope, create a new ticket in Jira and clearly mark that ticket as out of intended scope. Include that ticket ID in branch names/commit messages.
  • Before merging into dev, two developers must put eyes on the code. Merge to dev often.
  • Before merging from dev into main, formal code review should occur. Merge from dev into main at the end of each sprint.
  • The state of main and dev branches should match the deployment state of dev and prod servers. If rolling back a deployment, create a new branch from a prior deployment and merge that branch into dev/prod. At a glance, state of the repo should reflect state of deployments.

Deployment

  • Keep it simple — A docker container or two behind nginx.
  • Put docker .build file inside of git repo
  • Redeploy — ssh into VPS, pull changes, rebuild docker image (don’t forget to prune old images in the deploy script). Build a github actions deployment pipeline when appropriate.
  • Local development, secrets live inside of .NET User Secrets Manager (add via CLI).
  • Dev and Production, inject environment variables, use Google Cloud Secrets Manager
  • Use separate secrets/API keys/etc for dev and prod.