Skip to content

Instantly share code, notes, and snippets.

View brianjbayer's full-sized avatar

Brian J. Bayer brianjbayer

View GitHub Profile
@brianjbayer
brianjbayer / gist-env-vars-in-docker.md
Created January 19, 2022 16:04
Deep Dive into Using Environment Variables with Docker and docker-compose

Using Environment Variables in Docker: a Deep Dive

Hogback Ridge Park Pond - Brian Bayer


The advantage of containerization like Docker is that the container (nee image) is both the application and its operating environment.

However, since the container has its own operating environment,

@brianjbayer
brianjbayer / gist-docker-secrets.md
Created January 21, 2022 13:44
An Exploration into Using Docker Secrets with Docker Compose and What Works and What Does Not

Why I'm Not Using Docker Secrets with Docker Compose

No Bodies Ever- Brian Bayer


I was looking for a relatively simple and portable method of handling secrets (i.e. confidential data like usernames and passwords) in my projects. Something that demonstrated the principles and practices of (good) secret management that was still useable locally, in Continuous Integration/Continuous Deployment (CI/CD),

@brianjbayer
brianjbayer / gist-adding-basic-secret-handling-github-secrets.md
Created February 1, 2022 16:48
A How-To Guide for using Environment Variables and GitHub Secrets in GitHub Actions for Secrets Management in Continuous Integration

Adding Basic Secret Handling with Environment Variables and GitHub Secrets

Kitten in a Box - Wendy Bayer


As I mentioned on my failed attempt using Docker Secrets, I have been looking for a relatively simple and portable method of handling secrets (i.e. confidential data like usernames and passwords) in my personal projects. Something that demonstrated the principles

@brianjbayer
brianjbayer / gist-github-actions-basics.md
Last active December 17, 2022 22:55
Understand the Basics of GitHub Actions Workflows and Workflow Files

The Basics of GitHub Actions Workflows

Corndogs Ohio State Fair- Brian Bayer


You can use GitHub Actions as your Continuous Integration (CI) / Continuous Deployment (CD) pipeline for your GitHub source code repositories.

This gives you the advantages of...

@brianjbayer
brianjbayer / gist-reusable-gh-workflows.md
Last active March 23, 2024 20:35
Understand the Basics of Reusable Workflows in GitHub Actions

The Basics of GitHub Actions Reusable Workflows

Ohio State Fair - Brian Bayer


Duplication and repetition is pretty common in infrastructure configuration languages like GitHub Actions. Although you can never seem to get rid of all of it, there is usually something you can do to get rid of at least some of it.

@brianjbayer
brianjbayer / gist-add-ci-to-your-dockerbuild.md
Created March 21, 2022 14:56
Add Automated Continuous Integration (CI) To Your Dockerfile - Docker Multi-Stage Build Anti-Pattern

Simple, Cheap Continuous Integration (CI) in a Dockerfile

Garage Pool - Brian J. Bayer


This is absolutely no substitute for true automated Continuous Integration (CI), but it is better than nothing and it is fairly simple and cheap if you are already building images. It is also a great illustration of how to use multi-stage builds

Example of Outputs in GitHub Actions

Called Job

  branch-and-last-commit:
    runs-on: ubuntu-latest
    outputs:
      branch-name: ${{ steps.getbranch.outputs.branchname }}

 steps:
@brianjbayer
brianjbayer / gist-image-based-cicd.md
Last active February 18, 2024 15:28
A "White Paper" on Using an Image-Based CI/CD Model

An Image-Based Continuous Integration / Continuous Deployment Model

Kit Kat Clock (TM) - Brian J. Bayer


This model and approach is based on the belief that the (Docker) image of the application (and not the source code) should be the "source of truth" and object of the Continuous Integration / Continuous Deployment (CI/CD).

Key Points Covered...

@brianjbayer
brianjbayer / gist-create-dev-run-csharp-project-with-docker.md
Last active July 12, 2024 03:26
Create, Develop, and Run a New C# (.NET) Project Using Docker

Create, Develop, and Run Your C# (.NET) Projects All in Docker

Hand Rail at The Ohio State University - Wendy Bayer

Image Hand Rail at The Ohio State University by Wendy Bayer


You can create, develop, and run a new C# (.NET) project just using Docker without having to install dotnet on your machine.

@brianjbayer
brianjbayer / Dockerfile
Created October 19, 2022 14:24
Containerized Ruby on Rails 7 Bootstrap/Development Environment
# Dockerfile for a containerized development environment
# for the railstutorial.org Rails tutorial
# ASSUMPTION: source is volume mounted
# docker build --no-cache -t railsgen .
# docker run -it --rm -v $(pwd):/app -p 3000:3000 railsgen
# bundle exec bin/rails server -p 3000 -b 0.0.0.0
FROM ruby:3.1.2-slim-bullseye
ARG BUNDLER_VER=2.3.14
ARG RAILS_VER=7.0.4