File size: 970 Bytes
7b2787b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
services:
  workflow-engine:
    build:
      context: .
      dockerfile: Dockerfile
    container_name: workflow-engine
    ports:
      - "8000:8000"
    environment:
      - APP_NAME=FlowGraph
      - APP_VERSION=1.0.0
      - DEBUG=true
      - HOST=0.0.0.0
      - PORT=8000
      - MAX_ITERATIONS=100
      - LOG_LEVEL=INFO
    volumes:
      # Mount for development (hot reload)
      - .:/app
    command: uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
    healthcheck:
      test: [ "CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')" ]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 10s
    restart: unless-stopped

  # Optional: Run tests in a separate container
  tests:
    build:
      context: .
      dockerfile: Dockerfile
    container_name: workflow-engine-tests
    command: pytest tests/ -v
    profiles:
      - test
    depends_on:
      - workflow-engine