docker-compose.yml


Overview

The `docker-compose.yml` file defines and configures a Docker Compose application environment for the **Thorchain API** service. It specifies how to build and run the API service container, including environment variables, runtime commands, volumes, networking, and integration with Traefik as a reverse proxy/load balancer.

This file is essential for local development or deployment setups, enabling the Thorchain API to be run in a containerized environment with automatic file watching and recompilation, and seamless routing through Traefik.


Detailed Explanation

Services

api

Networks

thorchain


Important Implementation Details


Interaction with Other System Components


Usage Example

To start the Thorchain API service locally using this Compose file:

docker-compose -f docker-compose.yml up

Visual Diagram: Docker Compose Service & Network Structure

flowchart TD
    subgraph DockerCompose
        direction TB
        api[api Service\nImage: unchained-local-go]
        traefik[Traefik Proxy]
    end

    subgraph Host
        src[Host Source Code\n(../..)]
        gocache[Go Module Cache\n($GOPATH/pkg/mod/cache)]
    end

    subgraph Network[thorchain_default Network]
        api
        traefik
    end

    src -->|Volume Mount| api
    gocache -->|Volume Mount| api
    traefik -->|Routes to port 3000| api

Summary

This `docker-compose.yml` file sets up a development environment for the Thorchain API service with:

It facilitates rapid development and seamless integration into the larger Thorchain ecosystem via Docker networking and proxy configuration.