3 Getting started with Docker

 

This chapter covers

  • Creating containers for our project components using Docker and Docker Compose
  • Optimizing Docker containers and images for enhanced security and maintenance
  • Implementing general Docker maintenance to ensure our containers and images do not eat up disk space
  • Using health checks to ensure the system is up and running

In the last chapter (or sprint, if we are thinking in Agile terms), we created a functional (albeit basic) ACH parser. We also experimented with generative AI tools to help us work faster and more efficiently. We have made some progress exploring tools and getting our bearing with ACH processing. Enjoy that feeling because there will surely be days when we log off the computer feeling completely drained.

At this point, we have been given project requirements and a general framework of what a final project should contain. Of course, there are different approaches that we might take when working on a project, each having its pros and cons. While we may end up favoring one approach over others, there are always factors to consider when tackling a project, such as

3.1 Where to begin

3.2 Creating a docker-compose.yml file

3.2.1 Creating a CloudBeaver container

3.2.2 Create a PostgreSQL container

3.2.3 API container

3.2.4 Web server container

3.3 Connecting our containers

3.3.1 Connecting to the database

3.3.2 Troubleshooting PostgreSQL and FastAPI

3.4 Calling our API

3.4.1 Troubleshooting our web site

3.5 Container security

3.6 Optimizing Docker

3.6.1 General maintenance

3.6.2 Optimizing image size

3.6.3 Optimizing build time

3.7 Removing the hardcoded username/password

3.8 Health checks

Summary