-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.demo.yaml
More file actions
57 lines (55 loc) · 1.53 KB
/
compose.demo.yaml
File metadata and controls
57 lines (55 loc) · 1.53 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
services:
postgres:
image: postgres:15
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: rdi
ports:
- "5432:5432"
volumes:
- ./demo.sql:/docker-entrypoint-initdb.d/01-demo.sql:ro
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d rdi"]
interval: 5s
timeout: 5s
retries: 20
middleware-api:
image: python:3.12-slim
container_name: middleware-api-demo
environment:
- LOG_LEVEL=INFO
- LOCAL_UID=${LOCAL_UID:-1000}
- LOCAL_GID=${LOCAL_GID:-1000}
ports:
- "8000:8000"
volumes:
- ./demo_output:/data/arcs
- ./demo_api_main.py:/app/main.py:ro
command:
- /bin/sh
- -c
- |
set -e
pip install fastapi uvicorn arctrl
uvicorn main:app --app-dir /app --host 0.0.0.0 --port 8000
healthcheck:
test: ["CMD-SHELL", "python -c \"import urllib.request; urllib.request.urlopen('http://localhost:8000/live')\" 2>/dev/null || exit 1"]
interval: 5s
timeout: 5s
retries: 10
sql_to_arc:
image: sql_to_arc:latest
build:
context: ..
dockerfile: docker/Dockerfile.sql_to_arc
depends_on:
postgres:
condition: service_healthy
middleware-api:
condition: service_healthy
volumes:
- ./config.demo.yaml:/etc/sql_to_arc/config.yaml:ro
environment:
SQL_TO_ARC_CONNECTION_STRING: "postgresql+psycopg://postgres:postgres@postgres:5432/rdi"