• Stars
    star
    296
  • Rank 140,464 (Top 3 %)
  • Language
    Shell
  • License
    MIT License
  • Created almost 4 years ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Temporal docker-compose files

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.

Alongside the docker compose files you can find Kubernetes manifests suitable for setting up a development version of Temporal in a Kubernetes cluster. These files can be found in k8s directory, each directory holds the manifests related to one of the docker compose files. Details of using these manifests can be found in KUBERNETES.

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:8080.

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-tls.yml PostgreSQL and Elasticsearch with TLS
docker-compose-postgres.yml PostgreSQL
docker-compose-cass.yml Cassandra
docker-compose-cass-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-postgres-opensearch.yml PostgreSQL and OpenSearch

Using the web interface

docker-compose.yml includes the Temporal Web UI.

If you run command:

docker-compose up

You access the Temporal Web UI at http://localhost:8080.

Enabling metrics (with Grafana and Prometheus)

We maintain two example docker-compose setups with server metrics enabled, and Prometheus and Grafana with our Server and SDK dashboards:

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

Using Temporal docker images in production

These docker-compose setups listed here 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.

In a typical production setting, dependencies such as cassandra or elasticsearch are managed/started independently of the Temporal server. You should use the temporalio/server image instead of temporalio/auto-setup.

To use the temporalio/server 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>

More Repositories

1

temporal

Temporal service
Go
11,040
star
2

temporalite-archived

An experimental distribution of Temporal that runs as a single process
Go
608
star
3

sdk-typescript

Temporal TypeScript SDK
TypeScript
510
star
4

sdk-python

Temporal Python SDK
Python
446
star
5

sdk-go

Temporal Go SDK
Go
437
star
6

samples-go

Temporal Go SDK samples
Go
404
star
7

sdk-dotnet

Temporal .NET SDK
C#
373
star
8

samples-typescript

TypeScript
297
star
9

sdk-php

Temporal PHP SDK
PHP
274
star
10

helm-charts

Temporal Helm charts
Mustache
273
star
11

sdk-core

Core Temporal SDK that can be used as a base for language specific Temporal SDKs
Rust
262
star
12

cli

Command-line interface for running Temporal Server and interacting with Workflows, Activities, Namespaces, and other parts of Temporal
Go
246
star
13

sdk-java

Temporal Java SDK
Java
196
star
14

ui

Temporal UI
TypeScript
178
star
15

samples-java

Temporal Java SDK samples
Java
152
star
16

awesome-temporal

A curated list of awesome Temporal libraries and resources.
142
star
17

maru

Benchmarks for Temporal workflows
Go
126
star
18

samples-python

Samples for working with the Temporal Python SDK
Python
117
star
19

samples-php

Temporal PHP SDK samples
PHP
92
star
20

documentation

Temporal documentation
Python
84
star
21

dashboards

Temporal Dashboards
77
star
22

api

Temporal gRPC API and proto files
Makefile
77
star
23

web

Temporal Web UI v1
JavaScript
70
star
24

ui-server

Golang Server for https://github.com/temporalio/ui
Go
66
star
25

proposals

Temporal proposals
66
star
26

experiment-dotnet

Temporal SDK for .NET
C#
65
star
27

snipsync

JavaScript
65
star
28

background-checks

Sample application using Temporal
Go
64
star
29

sdk-ruby

Temporal Ruby SDK
Ruby
64
star
30

temporal-ecommerce

Go
57
star
31

samples-dotnet

Samples for working with the Temporal .NET SDK
C#
52
star
32

money-transfer-project-template-go

Go
47
star
33

tctl

Temporal CLI
Go
43
star
34

samples-server

Go
41
star
35

temporal-polyglot

PHP
35
star
36

tcld

The temporal cloud cli.
Go
32
star
37

docker-builds

Temporal service Docker images build
Shell
27
star
38

api-go

Temporal gRPC API and proto files compiled for Go
Go
27
star
39

temporal-render-simple

temporal-render-simple
Shell
25
star
40

edu-101-go-code

Code used in exercises and demonstrations for the "Temporal 101 with Go" course
CSS
24
star
41

roadrunner-temporal

Temporal PHP-SDK Host Process plugin for Roadrunner
Go
22
star
42

spring-boot-demo

Sample application demonstrating Temporal JavaSDK Spring Boot integration
Java
22
star
43

temporaldotio

Website for temporal.io. Built with Next.js + Preact + Tailwind, hosted on Vercel
JavaScript
20
star
44

vscode-debugger-extension

Visual Studio Code debugger plugin
TypeScript
18
star
45

ringpop-go

Go
17
star
46

temporal-pendulum

Demo showing off Temporal Polyglot features (Java, Go, TypeScript, PHP)
Java
16
star
47

benchmark-workers

Pre-written workflows and activities useful for benchmarking Temporal
Go
14
star
48

features

Behavior and history compatibility testing for Temporal SDKs
Go
13
star
49

subscription-workflow-project-template-go

Go
13
star
50

subscription-workflow-project-template-php

Subscription Workflow Project Template for PHP
PHP
12
star
51

omes

A load generator for Temporal
C#
12
star
52

sagas-temporal-trip-booking

Java
12
star
53

temporal-aws-sdk-go

Temporal activities and workflow stubs that wrap AWS Go SDK
Go
12
star
54

graphql

GraphQL API for Temporal Server
HTML
11
star
55

money-transfer-project-java

Java
11
star
56

subscription-workflow-project-template-typescript

This project template illustrates the design pattern for subscription style business logic.
TypeScript
11
star
57

sdk-scala

Scala SDK for Temporal
10
star
58

terraform-provider-temporalcloud

Terraform provider for Temporal Cloud
Go
10
star
59

replay2024-demo

Demo code and infra
JavaScript
9
star
60

github-repo-notion-sync

Sync an organization's GitHub repo list to a Notion DB
TypeScript
9
star
61

benchmark-matrix

Automated benchmarks for Temporal
TypeScript
8
star
62

api-cloud

Temporal cloud gRPC API and proto files
Makefile
8
star
63

hello-world-project-template-go

Go
7
star
64

temporal-compensating-transactions

A four implementations of the Compensating Transaction pattern in Temporal in go, python, java and typescript
Java
6
star
65

edu-102-go-code

Code used in exercises and demonstrations for the "Temporal 102 with Go" course
Go
6
star
66

xk6-temporal

k6 Extension for testing/benchmarking Temporal
Go
6
star
67

hello-world-project-template-java

Java
6
star
68

money-transfer-project-template-ts

TypeScript
6
star
69

temporal-jumpstart-java

Some repos Start. This one Jump Starts.
Java
5
star
70

subscription-workflow-project-template-java

Subscription workflow project template for Java
Java
5
star
71

edu-101-java-code

Code Exercises for Temporal 101 in java
CSS
4
star
72

edu-101-typescript-code

Code used in exercises and demonstrations for the Temporal 101 (TypeScript) course
CSS
4
star
73

temporal-aws-sdk-generator

AWS SDK Bindings Generator
Go
4
star
74

documentation-samples-python

Python
4
star
75

data-pipeline-project-python

Python
4
star
76

temporal-animations

A toolkit for creating animations explaining Temporal
Python
4
star
77

reference-app-orders-go

Order processing reference application
Go
4
star
78

documentation-samples-go

Go
3
star
79

homebrew-brew

The official Homebrew tap for temporalio
Ruby
3
star
80

docusaurus-plugin-snipsync

Snipsync plugin for docusaurus - insert snippets into markdown files
TypeScript
3
star
81

temporal-demo-infra

Svelte
3
star
82

money-transfer-project-template-python

Python
3
star
83

graphql-proxy

GraphQL API for Temporal Server
Java
3
star
84

background-check-typescript

TypeScript
3
star
85

team

The Temporal team
3
star
86

sdk-php-interceptors-opentelemetry

Opentelemetry interceptors package for PHP SDK
PHP
3
star
87

email-subscription-project-python

Python
3
star
88

temporal-learning

HTML
3
star
89

temporal-development-patterns-whitepapers

Temporal Development Patterns Whitepapers
Java
2
star
90

idea-settings

2
star
91

cloud-samples-go

Temporal Cloud Samples - Go
Go
2
star
92

demo-go

Go
2
star
93

cheatsheets

Cheatsheets for the Temporal CLI
2
star
94

setup-temporal

TypeScript
2
star
95

worker-versioning-replay-demo

TypeScript
2
star
96

ringpop-common

JavaScript
2
star
97

temporal-cafe-typescript

TypeScript
2
star
98

temporal-pause-resume-compensate

Java
2
star
99

temporal-vscode

temporal-vscode
1
star
100

replay-demo-2023

Replay Demo 2023: Workflow Update, Schedules and Worker Versioning
Go
1
star