Release

📁 See the Release Folder →

The application is ready and has validated the tests… It’s time to create the Docker images of the application and store them in an image registry.

Docker Compose file

A docker-compose.yml file is created and used to build the Docker images. 📃 See docker-compose file docker-compose.yml

Build images

To build the Client, API and Postgres (Worker) Docker images, we use the docker-compose file, and provide the arguments needed for the images.

This gives the following command to execute in the folder where the docker-compose file is located:

docker-compose build \
--build-arg POSTGRES_USER=$POSTGRES_USER \
--build-arg POSTGRES_PASSWORD=$POSTGRES_PASSWORD \
--build-arg POSTGRES_DB=$POSTGRES_DB \
--no-cache

Store images

The images are now generated and should be stored in an image register. The infrastructure is fully deployed on AWS, so we will use AWS ECR (Elastic Container Registry).

Images tags & Versioning

The Client, API and Postgres images will be used twice: once for the Review environment and once for the Production environment. It is therefore necessary to assign two tags to the images: a review tag and a prod tag.

Moreover, we want to apply Versioning on our images, for that nothing simpler: The Versioning of the images will be based on the SHA code of the commits.

To put it plainly, the name assigned to the Postgres image of the Review environment from the commit 2de0f64c will have the following name:

product-hunting-postgres:review-2de0f64c