diff --git a/.gitpod.readme.md b/.gitpod.readme.md deleted file mode 100644 index 61bed5d4..00000000 --- a/.gitpod.readme.md +++ /dev/null @@ -1,16 +0,0 @@ -# Welcome to the TS SDK Gitpod setup! - -If you're reading this, you probably clicked on our Gitpod link: -[![Gitpod ready-to-code](https://img.shields.io/badge/Gitpod-ready--to--code-908a85?logo=gitpod)](https://gitpod.io/#https://github.com/temporalio/samples-typescript/) - -We have preconfigured Gitpod with some recommended settings (in [.gitpod.yml](/.gitpod.yml)). -When you first launch, we will open 3 terminals: - -- Pane 1: Temporal Server - running in background with Docker Compose -- Pane 2: Hello World sample - - Left: Temporal Worker - running and hot reloading - - Right: Temporal Client - run `npm run workflow` - -It takes ~1 minute for the Docker Compose cluster to start up, so we put in manual sleeps as we have not found a more reliable solution. - -Once you have it up and running (Temporal Web should show the first Workflow Execution), you can use our [Hello World Walkthrough tutorial](https://docs.temporal.io/go/hello-world-tutorial) to orient you to the sample file structure. diff --git a/.gitpod.yml b/.gitpod.yml deleted file mode 100644 index 14769974..00000000 --- a/.gitpod.yml +++ /dev/null @@ -1,47 +0,0 @@ -# this is a config file for gitpod setup, ignore if you are running samples locally -# See readme at https://github.com/temporalio/samples-typescript/blob/main/.gitpod.readme.md - -tasks: - - name: Run Hello World Worker - init: | - alias tctl="docker exec temporal-admin-tools tctl" - echo "tctl configured! try typing tctl -v" - cd hello-world # this cd doesnt persist in postbuild - npm install - command: | - gp open ../.gitpod.readme.md - sleep 40 - cd hello-world - npm run start.watch - - name: Run Hello World Workflow - init: | - alias tctl="docker exec temporal-admin-tools tctl" - echo "tctl configured! try typing tctl -v" - command: | - cd hello-world - sleep 45 - npm run workflow # run workflow again for user's easy access - sleep 5 - gp preview http://localhost:8088 # open up Temporal Web to show new workflow - openMode: split-right - - name: Temporal Server - init: docker-compose pull - command: docker-compose up - -ports: - - port: 5432 # postgres - onOpen: ignore - - port: 7233 # temporal server - onOpen: ignore - - port: 8088 # temporal web - onOpen: ignore - visibility: public - - port: 8080 # temporal ui - onOpen: ignore - visibility: public -# notes for future temporalite usage -# - name: Temporalite -# init: go install github.com/DataDog/temporalite/cmd/temporalite@latest -# command: temporalite start --namespace default -f my-test.db -# separate temporal web -# docker run -t -i -p 8088:8088 -e TEMPORAL_GRPC_ENDPOINT=temporal:7233 temporalio/web:1.12.0 # this does not work yet :( diff --git a/README.md b/README.md index 027db7c3..e952c341 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,6 @@ - [samples-typescript](#samples-typescript) - [Running](#running) - - [In browser](#in-browser) - [Locally](#locally) - [Scaffold](#scaffold) - [Samples](#samples) @@ -30,13 +29,6 @@ Each directory in this repo is a sample Temporal project built with the [TypeScr ## Running -### In browser - -The fastest way to try out these samples is running them in the browser: - -- Gitpod: [One click to try](https://gitpod.io/#https://github.com/temporalio/samples-typescript/) (there is a good free tier) -- [GitHub Codespaces](https://docs.github.com/en/codespaces/developing-in-codespaces/creating-a-codespace#creating-a-codespace) (if your org admin has enabled this) - [90 second video demo](https://youtu.be/FdEQQC9EdfU) - ### Locally Run Temporal Server: diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index 59fae196..00000000 --- a/docker-compose.yml +++ /dev/null @@ -1,120 +0,0 @@ -# this is a simple docker compose that has been tested to work with gitpod, -# for running these samples in the browser with no need to run Temporal Server locally -# thanks to Johannes Schickling for figuring this out -# see https://github.com/temporalio/docker-compose for other reference docker-compose files -version: '3.5' -services: - ## uncomment if you need search attributes feature - ## dont forget to uncomment the ES related comments in the temporal service - # elasticsearch: - # container_name: temporal-elasticsearch - # environment: - # - cluster.routing.allocation.disk.threshold_enabled=true - # - cluster.routing.allocation.disk.watermark.low=512mb - # - cluster.routing.allocation.disk.watermark.high=256mb - # - cluster.routing.allocation.disk.watermark.flood_stage=128mb - # - discovery.type=single-node - # - ES_JAVA_OPTS=-Xms100m -Xmx100m - # image: elasticsearch:7.10.1 - # # networks: - # # - temporal-network - # ports: - # - 9200:9200 - postgresql: - container_name: temporal-postgresql - environment: - POSTGRES_PASSWORD: temporal - POSTGRES_USER: temporal - image: postgres:13 - # networks: - # - temporal-network - ports: - - 5432:5432 - temporal: - container_name: temporal - depends_on: - - postgresql - # - elasticsearch - environment: - - DB=postgresql - - DB_PORT=5432 - - POSTGRES_USER=temporal - - POSTGRES_PWD=temporal - - POSTGRES_SEEDS=postgresql - - DYNAMIC_CONFIG_FILE_PATH=config/dynamicconfig/development_es.yaml - # - ENABLE_ES=true - # - ES_SEEDS=elasticsearch - # - ES_VERSION=v7 - # https://github.com/temporalio/temporal/issues/2539 - image: temporalio/auto-setup:1.13.4 - # networks: - # - temporal-network - ports: - - 7233:7233 - volumes: - - ./dynamicconfig:/etc/temporal/config/dynamicconfig - temporal-admin-tools: - container_name: temporal-admin-tools - depends_on: - - temporal - environment: - - TEMPORAL_CLI_ADDRESS=temporal:7233 - - TEMPORAL_ADDRESS=temporal:7233 - # https://github.com/temporalio/temporal/issues/2539 - image: temporalio/admin-tools:1.13.4 - # networks: - # - temporal-network - stdin_open: true - tty: true - # the old UI, on 8088 - temporal-web: - container_name: temporal-web - depends_on: - - temporal - environment: - - TEMPORAL_GRPC_ENDPOINT=temporal:7233 - - TEMPORAL_PERMIT_WRITE_API=true - image: temporalio/web:1.13.0 - # networks: - # - temporal-network - ports: - - 8088:8088 - # the experimental new UI version, on 8080 - temporal-ui: - container_name: temporal-ui - depends_on: - - temporal - environment: - - TEMPORAL_ADDRESS=temporal:7233 - - TEMPORAL_CORS_ORIGINS=http://localhost:3000 - image: temporalio/ui:2.16.2 - # networks: - # - temporal-network - ports: - - 8080:8080 - - ## uncomment only if you need these features, eg you are Johannes - ## Collector - #otel-collector: - # image: otel/opentelemetry-collector:0.27.0 - # command: ['--config=/conf/collector-config.yaml', '--log-level=DEBUG'] - # volumes: - # - ./collector-config.yaml:/conf/collector-config.yaml - # ports: - # - '9464:9464' - # - '4317:4317' - # - '55681:55681' - # depends_on: - # - jaeger-all-in-one - # - ## Jaeger - #jaeger-all-in-one: - # image: jaegertracing/all-in-one:1.22.0 - # ports: - # - '16686:16686' - # - '14268:14268' - # - '14250' -# networks: -# temporal-network: -# driver: bridge -# name: temporal-network diff --git a/search-attributes/.post-create b/search-attributes/.post-create deleted file mode 100644 index 3803d8c3..00000000 --- a/search-attributes/.post-create +++ /dev/null @@ -1,20 +0,0 @@ -To begin development, install Docker: - -Mac: {cyan brew cask install docker; open} /Applications/Docker.app -Other: https://www.docker.com/products/docker-desktop - -Start Temporal Server: - -{cyan git clone} https://github.com/temporalio/docker-compose.git temporal-server -{cyan cd} temporal-server/ -{cyan docker-compose up} - -Use Node version 18+ (v22.x is recommended): - -Mac: {cyan brew install node@22} -Other: https://nodejs.org/en/download/ - -Then, in the project directory, using two other shells, run these commands: - -{cyan npm run start.watch} -{cyan npm run workflow} diff --git a/search-attributes/README.md b/search-attributes/README.md index b131e5b6..7952f457 100644 --- a/search-attributes/README.md +++ b/search-attributes/README.md @@ -19,8 +19,6 @@ This runs [`src/client-operator-service.ts`](./src/client-operator-service.ts), - Read search attributes from `WorkflowInfo` - Upsert search attributes -This requires an Elasticsearch instance, which is included in the default `docker-compose`. - ### Running this sample 1. `temporal server start-dev` to start [Temporal Server](https://github.com/temporalio/cli/#installation).