|
| 1 | +services: |
| 2 | + # PostgreSQL with pgvector extension |
| 3 | + postgres: |
| 4 | + image: pgvector/pgvector:pg16 |
| 5 | + environment: |
| 6 | + POSTGRES_USER: ${POSTGRES_USER:-postgres} |
| 7 | + POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres} |
| 8 | + POSTGRES_DB: ${POSTGRES_DB:-memu} |
| 9 | + ports: |
| 10 | + - "5432:5432" |
| 11 | + volumes: |
| 12 | + - postgres-data:/var/lib/postgresql/data |
| 13 | + healthcheck: |
| 14 | + test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres}"] |
| 15 | + interval: 5s |
| 16 | + timeout: 5s |
| 17 | + retries: 5 |
| 18 | + networks: |
| 19 | + - memu-network |
| 20 | + |
| 21 | + # Temporal server |
| 22 | + # Note: Temporal shares the same PostgreSQL instance as the main app but uses |
| 23 | + # a separate database (`TEMPORAL_DB`, default: `temporal`) from the app's |
| 24 | + # database (`POSTGRES_DB`, default: `memu`). |
| 25 | + # TODO: For production, consider using a separate PostgreSQL instance for Temporal |
| 26 | + # or at minimum keep Temporal and the app in separate databases as configured here. |
| 27 | + # Pointing both services at the same database can cause schema conflicts and is |
| 28 | + # not recommended. |
| 29 | + temporal: |
| 30 | + image: temporalio/auto-setup:1.25.1 |
| 31 | + depends_on: |
| 32 | + postgres: |
| 33 | + condition: service_healthy |
| 34 | + environment: |
| 35 | + - DB=postgresql |
| 36 | + - DB_PORT=5432 |
| 37 | + - POSTGRES_USER=${POSTGRES_USER:-postgres} |
| 38 | + - POSTGRES_PWD=${POSTGRES_PASSWORD:-postgres} |
| 39 | + - POSTGRES_SEEDS=postgres |
| 40 | + - POSTGRES_DB=${TEMPORAL_DB:-temporal} |
| 41 | + - DYNAMIC_CONFIG_FILE_PATH=config/dynamicconfig/development-sql.yaml |
| 42 | + ports: |
| 43 | + - "7233:7233" # Temporal gRPC |
| 44 | + networks: |
| 45 | + - memu-network |
| 46 | + |
| 47 | + # Temporal Web UI |
| 48 | + temporal-ui: |
| 49 | + image: temporalio/ui:2.31.2 |
| 50 | + depends_on: |
| 51 | + - temporal |
| 52 | + environment: |
| 53 | + - TEMPORAL_ADDRESS=temporal:7233 |
| 54 | + ports: |
| 55 | + - "8088:8080" # Temporal Web UI |
| 56 | + networks: |
| 57 | + - memu-network |
| 58 | + |
| 59 | +volumes: |
| 60 | + postgres-data: |
| 61 | + driver: local |
| 62 | + |
| 63 | +networks: |
| 64 | + memu-network: |
| 65 | + driver: bridge |
0 commit comments