initia icon indicating copy to clipboard operation
initia copied to clipboard

Create docker-compose.yml

Open GentlemenValidators opened this issue 7 months ago • 1 comments

Motivation

This patch is motivated by the need to streamline the build and deployment process for the Initia project. By creating a Docker Compose configuration for the existing Dockerfile, we enable developers to easily build and run the Initia application in a consistent environment. This improvement enhances both the user experience and the developer experience by simplifying setup and ensuring reliable execution across different environments.

Rationale

The proposed change provides the following benefits:

  • Consistency: Ensures that the application runs in the same environment regardless of the host system.
  • Ease of Use: Simplifies the process of building and running the application with a single command.
  • Portability: Facilitates the deployment of the Initia application in different environments, including local development, testing, and production.

Changes Made

  • Added docker-compose.yml file to the project repository.
  • Configured Docker Compose to build and run the application using the existing Dockerfile.
  • Exposed necessary ports for rest server, gRPC, and Tendermint services.
  • Included environment variables to handle different target architectures.

Tests

The changes have been tested by:

  • Building the Docker image using Docker Compose.
  • Running the application and verifying that it starts correctly.
  • Ensuring that all services are accessible through the exposed ports.

No new unit tests were required as the change primarily affects the build and deployment configuration. However, functional tests were conducted to confirm the application's behavior in the Dockerized environment.

Bug Fixes

N/A

Features

N/A

Steps to Reproduce

  1. Place the docker-compose.yml file in the project root directory.
  2. Define the TARGETARCH environment variable in a .env file or export it in your shell.
  3. Run docker-compose build to build the Docker image.
  4. Run docker-compose up to start the application.

By following these steps, developers can ensure that the Initia application runs in a controlled and reproducible environment.

GentlemenValidators avatar Jul 04 '24 09:07 GentlemenValidators