Git Product home page Git Product logo

docker-compose-1's Introduction

Temporal Server docker-compose files

This repository provides docker-compose files that enable you to run a local instance of the Temporal Server. There are a variety of docker-compose files, each utilizing a different set of dependencies. Every major or minor release of the Temporal Server has a corresponding docker-compose release.

Prerequisites

To use these files, you must first have the following installed:

How to use

The following steps will run a local instance of the Temporal Server using the default configuration file (docker-compose.yml):

  1. Clone this repository.
  2. Change directory into the root of the project.
  3. Run the docker-compose up command.
git clone https://github.com/temporalio/docker-compose.git
cd  docker-compose
docker-compose up

โš ๏ธ If you are on an M1 Mac, note that Temporal v1.12 to v1.14 had fatal issues with ARM builds. v1.14.2 onwards should be fine for M1 Macs.

After the Server has started, you can open the Temporal Web UI in your browser: http://localhost:8088.

You can also interact with the Server using a preconfigured CLI (tctl). First create an alias for tctl:

alias tctl="docker exec temporal-admin-tools tctl"

The following is an example of how to register a new namespace test-namespace with 1 day of retention:

tctl --ns test-namespace namespace register -rd 1

You can find our tctl docs on docs.temporal.io.

Get started building Workflows with a Go sample, Java sample, or write your own using one of the SDKs.

Other configuration files

The default configuration file (docker-compose.yml) uses a PostgreSQL database, an Elasticsearch instance, and exposes the Temporal gRPC Frontend on port 7233. The other configuration files in the repo spin up instances of the Temporal Server using different databases and dependencies. For example you can run the Temporal Server with MySQL and Elastic Search with this command:

docker-compose -f docker-compose-mysql-es.yml up

Here is a list of available files and the dependencies they use.

File Description
docker-compose.yml PostgreSQL and Elasticsearch (default)
docker-compose-postgres.yml PostgreSQL
docker-compose-cas.yml Cassandra
docker-compose-cas-es.yml Cassandra and Elasticsearch
docker-compose-mysql.yml MySQL
docker-compose-mysql-es.yml MySQL and Elasticsearch
docker-compose-cockroach.yml CockroachDB
docker-compose-cockroach-es.yml CockroachDB and Elasticsearch
docker-compose-ui-experimental.yml Web v2 Beta (Experimental)

Use a custom image configuration

If you want, you can even use a custom Docker image of the Temporal Server.

Clone the main Temporal Server repo: https://github.com/temporalio/temporal:

git clone https://github.com/temporalio/temporal.git

In the following command, replace <YOUR_TAG> and <YOUR_COMMIT> to build the custom Docker image:

git checkout <YOUR_COMMIT>
docker build . -t temporalio/auto-setup:<YOUR_TAG> --build-arg TARGET=auto-setup

Next, in the docker-compose.yml file, replace the services.temporal.image configuration value with <YOUR_TAG>.

Then run the docker-compose up command:

docker-compose up

Quickstart for production

In a typical production setting, dependencies such as cassandra or elasticsearch are managed/started independently of the Temporal server. To use the container in a production setting, use the following command:

docker run -e CASSANDRA_SEEDS=10.x.x.x                  -- csv of Cassandra server ipaddrs
    -e KEYSPACE=<keyspace>                              -- Cassandra keyspace
    -e VISIBILITY_KEYSPACE=<visibility_keyspace>        -- Cassandra visibility keyspace
    -e SKIP_SCHEMA_SETUP=true                           -- do not setup Cassandra schema during startup
    -e NUM_HISTORY_SHARDS=1024  \                       -- Number of history shards
    -e SERVICES=history,matching \                      -- Spin-up only the provided services
    -e LOG_LEVEL=debug,info \                           -- Logging level
    -e DYNAMIC_CONFIG_FILE_PATH=config/foo.yaml         -- Dynamic config file to be watched
    temporalio/server:<tag>

Auto-Setup

These docker-compose setups do not use Temporal Server directly - they utilize an auto-setup script you can read about here. You will want to familiarize yourself with this before you deploy to production.

Using the new, experimental web interface

docker-compose -f docker-compose-ui-experimental.yml up

The web interface is located at http://localhost:8080 by default.

docker-compose-1's People

Contributors

alexshtin avatar ardagan avatar dnr avatar feedmeapples avatar flossypurse avatar gshively11 avatar jbendotnet avatar jgarcia241 avatar stevekinney avatar swyxio avatar wxing1292 avatar yiminc avatar yodon avatar yux0 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.