File size: 1,143 Bytes
d2d1903
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
41
# OrgState Engine — local / single-node deployment.
#
# Two processes off ONE image, sharing ONE database volume:
#   api        — the HTTP API (uvicorn infra.api.app:app)
#   scheduler  — the ingestion scheduler loop
#
# SQLite-on-a-volume today; a Postgres service slots in here later (the
# infra/storage Database class is the seam). See MIGRATION_MAP.md.

services:
  api:
    build: .
    command: ["bash", "infra/deployment/scripts/start_api.sh"]
    ports:
      - "8080:8080"
    environment:
      ORGSTATE_DB_PATH: /data/orgstate.sqlite3
      ORGSTATE_LOG_FORMAT: json
      ORGSTATE_LOG_LEVEL: INFO
    volumes:
      - orgstate-data:/data
    restart: unless-stopped

  scheduler:
    build: .
    command: ["bash", "infra/deployment/scripts/start_scheduler.sh"]
    environment:
      ORGSTATE_DB_PATH: /data/orgstate.sqlite3      # same DB as the API
      ORGSTATE_LOG_FORMAT: json
      ORGSTATE_LOG_LEVEL: INFO
      ORGSTATE_SCHEDULER_POLL_SECONDS: "60"
      ORGSTATE_ENABLE_SCHEDULER: "true"
    volumes:
      - orgstate-data:/data
    depends_on:
      - api
    restart: unless-stopped

volumes:
  orgstate-data: