Docker Compose minimal¶
Fast local demo
This example runs the gateway and a tiny Python app together in one `docker compose` project.
Use this example when:
- you want the fastest demo you can hand to another developer
- you want both the gateway and a tiny app in one local stack
- you want to avoid local bind-mount weirdness on remote Docker contexts
Best for¶
Use this example when you want:
- a fast local demo
- a gateway plus one real app container
- a simple smoke-test environment for teammates
What it demonstrates¶
- a published LunarGate image wrapped with a tiny local
gateway.Dockerfile config.yamlbaked into the image duringdocker compose build- a tiny Flask API calling the gateway through the OpenAI SDK
- health checks and smoke checks for both services
Why the wrapper image exists¶
Instead of bind-mounting config.yaml into the gateway container, this example builds a tiny wrapper image and copies the config into it.
That matters because it is more reliable when Docker is running on a remote context instead of directly on your laptop. It avoids the common macOS /Volumes/... bind-mount problem where the remote Docker host cannot see your local file path.
Tip
This wrapper-image pattern is worth reusing in your own examples and internal demos whenever the gateway config should travel with the image instead of depending on host-specific file paths.
Run it¶
What you get¶
- gateway:
http://127.0.0.1:8080 - demo app:
http://127.0.0.1:8000
Smoke checks¶
curl http://127.0.0.1:8080/health
curl http://127.0.0.1:8080/v1/models
curl http://127.0.0.1:8000/health
curl -X POST http://127.0.0.1:8000/ask \
-H "Content-Type: application/json" \
-d '{"prompt":"Say hello from docker compose."}'
What to inspect¶
docker-compose.ymlfor service wiring and portsgateway.Dockerfilefor the wrapper image patternapp/app.pyfor the tiny Flask integrationconfig-simple.yaml.examplefor the smallest compose-friendly gateway config
When to choose this over the Python basic example¶
Pick this one if you want to share a demo with people who would rather run one compose command than install Python and Poetry locally.
What to read next¶
- Read Streamlit chat in Docker Compose if you want the same local pattern but with a browser UI instead of a tiny API.
- Read Docker Compose if you want to build your own public minimal
docker-compose.yamlinstead of starting from this ready-made example.