Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Project Structure

...

  • We use Docker images to deploy the applications
    • I’m assuming everyone is familiar with Docker but if not let me know and I’ll run through why we use it
  • Docker images can have tags, so we use these to separate environments (dev, staging, production etc)
  • Our Docker-Compose file pulls and configures all images required to run the whole stack
  • Runtime configuration is handled by .env files or environment variables


Devops Flow

Branches

Image RemovedImage Added


  • Main
    • Development branch
    • Code should rarely be committed directly
    • Base for feature/fix branches
  • Feature branches
    • When working on a specific feature/fix, create a new branch for that work item 
    • Either submit a PR when ready, or create a draft PR whenever
    • PRs should pass all tests and code-quality checks before merging
    • PRs should be reviewed by someone else on the project before merging
  • Staging
    • Once the “main” branch is ready to be deployed to staging, merge into the ‘staging’ branch
    • This will trigger an image build with the “staging” tag
  • Production
    • Once the “staging” branch is ready to be deployed to live, merge into the ‘production’ branch
    • This will trigger an image build with the “production” tag

...

  • Our Docker images are deployed to GHCR (https://github.com/orgs/renalreg/packages)
  • Once the image has been deployed (check repo Actions tab for status), connect to the app server via SSH
  • Run:
    • cd /srv/ukrdc-compose
    • docker-compose pull 
    • docker-compose down
    • docker-compose up -d

...