spiral / app

Spiral Framework Skeleton HTTP Application: Queue, Console, Cycle ORM
https://spiral.dev/
MIT License
191 stars 20 forks source link

Fix Docker Compose Configuration for Temporal Infrastructure in Spiral Installer #138

Closed butschster closed 7 months ago

butschster commented 10 months ago

When opting to install the spiral/temporal-bridge package, a docker compose file for the Temporal infrastructure is provided. However, the provided configuration does not work as expected and needs to be corrected.

A working configuration can be taken from the Temporal PHP SDK repository here, although it's advisable to omit Elasticsearch for development purposes.

Here's a corrected version of the docker compose file:

version: '3.5'

services:
    postgresql:
        container_name: test-temporal-postgresql
        image: postgres:15
        environment:
            POSTGRES_PASSWORD: temporal
            POSTGRES_USER: temporal
        ports:
            - 5432:5432
    temporal:
        container_name: test-temporal-temporal
        image: temporalio/auto-setup:1.21
        ports:
            - "7233:7233"
        volumes:
            - ${DYNAMIC_CONFIG_DIR:-../config/dynamicconfig}:/etc/temporal/config/dynamicconfig
        environment:
            - DB=postgresql
            - DB_PORT=5432
            - POSTGRES_USER=temporal
            - POSTGRES_PWD=temporal
            - POSTGRES_SEEDS=postgresql
            - DYNAMIC_CONFIG_FILE_PATH=config/dynamicconfig/development.yaml
        depends_on:
            - postgresql
    temporal-admin-tools:
        container_name: test-temporal-admin-tools
        image: temporalio/admin-tools:1.21
        stdin_open: true
        tty: true
        environment:
            - "TEMPORAL_CLI_ADDRESS=temporal:7233"
        depends_on:
            - temporal
    temporal-ui:
        container_name: test-temporal-ui
        image: temporalio/ui:2.17.1
        environment:
            - TEMPORAL_ADDRESS=temporal:7233
            - TEMPORAL_CORS_ORIGINS=http://localhost:3000
        ports:
            - "8088:8080"
        depends_on:
            - temporal

Additionally, remember to mount the dynamicconfig folder from here.