blob: f732641b2f701005cf9f2b214dadcb491ae36c98 [file] [log] [blame]
# The local cluster playground setup using Docker
# The composer uses the local built image:
# `bazelisk run //temporal:temporal-server`
# `bazelisk run @com_github_temporal_ui//:temporal-ui`
#
# The local instances can be started from the root dir:
# `docker-compose -f temporal/docker-compose.yml`
version: "3.5"
services:
cockroach:
cap_drop:
- ALL
command:
- start-single-node
- --insecure
container_name: temporal-cockroach
hostname: cockroach
image: cockroachdb/cockroach
networks:
- temporal-network
ports:
- 26257:26257
restart: on-failure:5
security_opt:
- no-new-privileges
tty: false
volumes:
- dbdata:/cockroach/cockroach-data
temporal:
container_name: temporal
depends_on:
- cockroach
environment:
- DB=postgresql
- DB_PORT=26257
- POSTGRES_USER=root
- POSTGRES_PWD=
- POSTGRES_SEEDS=postgres
image: bazel/temporal:temporal-server
links:
- cockroach:postgres
networks:
- temporal-network
ports:
- 7233:7233
entrypoint: /entrypoint.sh init-db start-server
temporal-init:
container_name: temporal-init
image: bazel/temporal:temporal-server
environment:
- TEMPORAL_ADDRESS=temporal:7233
networks:
- temporal-network
entrypoint: /entrypoint.sh setup-server
temporal-ui:
container_name: temporal-ui
depends_on:
- temporal-init
environment:
- TEMPORAL_ADDRESS=temporal:7233
- TEMPORAL_CORS_ORIGINS=http://localhost:3000
image: bazel/temporal:temporal-ui
networks:
- temporal-network
ports:
- 8080:8080
networks:
temporal-network:
driver: bridge
name: temporal-network
volumes:
# Run `docker volume create dbdata` to create a volume first
# so the data can be persisted.
dbdata:
external: true