The server at ai.binarygnome.com returns 405 on POST /api/generate,
which means it speaks the OpenAI-compatible API rather than the native
Ollama format. Switch to /v1/chat/completions with messages[] payload
and data.choices[0].message.content response parsing.
Also add optional OLLAMA_API_KEY env var for servers that require a
Bearer token.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
network_mode: bridge uses Docker's default bridge which has no
service-name DNS. An explicit named network gets its own resolver
so nginx can resolve "server" by name. Also adds a healthcheck so
app waits until server is actually ready before nginx starts.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>