Not the Pants
2025-09-12 by Mark Hart
Docker
I have been using the same wallet for over 20 years. Its a Docker money clip.
I always plan out my applications with the hope of future growth. This is no different. I decided to go with containers because it gives me the easiest way to scale in a hurry. (For the past 30+ years, I have always told people that I am only one app away from retirement. Perhaps this app could be my Facebook, but I would be just as happy writting a MySpace level app. 😎) Plus it gave me a chance to play with a different technology.
My first impressions
Containers seem pretty cool and Docker installed on my maching pretty easily. The learning curve to get a container up and running through VScode wasn't anything to bad. I know that there are developers out there that will shun me, but I found Docker Composer files early and have stuck with them. They just work and they syntax isn't to extreme.
The rabbit hole app is actually a stack of containers to isolate and handle different aspects of the application.
The docker-compose.yml file made it a breeze to add a database to the application ''' db: image: postgres:15 networks: - appnet restart: always env_file: - .env ports: - "${DB_PORT}:xxxx" volumes: - db_data:/var/lib/postgresql/data '''
Secrets
Secrets are kept in .env files Example '''
To switch the stack to production, uncomment the next line and comment out the development line
STACK_ENV=development #STACK_ENV=production
Database
POSTGRES_DB=hello_world POSTGRES_USER=your_username POSTGRES_PASSWORD=your_password '''
Starting a container or container stack is a simple ''' docker compose up --build '''
