Skip to content

cosmos/atlas

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

Atlas

Build, Test and Cover Go Report Card codecov GoDoc

Source code for the default Cosmos SDK module registry, viewable online at atlas.cosmos.network.

Table of Contents

Background

Atlas implements a Cosmos SDK module registry, where developers are able to publish and update modules. The registry provides a singular and holistic interface for application developers to discover Cosmos SDK modules when building their blockchain applications.

More information about the architecture, publishing and module configuration can be found under docs.

Usage

Atlas is composed of two primary components, the server and the web application. The server is responsible for providing a RESTful API, handling user authentication via Github OAuth and persisting modules and relevant data to PostgreSQL.

Server

In order to start the Atlas server, you must provide a series of configuration values that may be defined in environment variables, a configuration file or via CLI flags (in order of precedence). See the sample env or config files for all possible configurations.

$ atlas server --config=/path/to/atlas/config.toml

Note:

  1. Atlas will look for environment variables defined in a .env file in the root directory. Any explicit environment variables defined will override those defined in this file.
  2. Certain configuration values are not exposed or able to be provided via CLI flags.

See --help for further documentation.

Web App

TODO

Migrations

Atlas performs migrations through the migrate tool. The migrations are defined in db/migrations. In order to run migrations, you must provide a ATLAS_DATABASE_URL environment variable.

$ ATLAS_DATABASE_URL=... make migrate

Tests

Atlas performs all database relevant tests through a Docker Postgres instance. Executing the $ make test target will automatically start a Postgres Docker instance and populate all relevant environment variables. If you'd like to execute tests on a different Postgres instance, you must provide the ATLAS_MIGRATIONS_DIR and ATLAS_TEST_DATABASE_URL environment variables.

$ ATLAS_TEST_DATABASE_URL=... ATLAS_MIGRATIONS_DIR=... make test

License