Automating Postgres Deployment with Docker Compose and Init Scripts

Introduction to Running PostgreSQL in a Docker Container using Docker Compose In this blog post, we will explore how to run PostgreSQL in a Docker container using Docker Compose. We will also break down and explain the init-user-db.sh script that is executed at startup to initialize the PostgreSQL tables. Running PostgreSQL in a Docker container provides several benefits, including ease of deployment, portability, and isolation. So let’s dive in and understand the process!...

January 6, 2024 · 5 min · Tom

How To call a bash command with variables in Python

A quick Google of the above only seemed to give me answers for the inverse, calling a python script from a bash shell and handing it variables. At least, the first 3 results showed this and I’m probably not alone when it comes to scrolling down past the StackOverflow articles. So I am had to go it alone and the way that I figured out how to call a bash command with variables in Python (3), is a total hack… But it works....

December 28, 2020 · 3 min · Tom