Shared AI Infrastructure
A reusable Docker Compose foundation for hosting multiple AI applications on a single Oracle VPS.
View on GitHubProblem & context
Each new AI project needs the same plumbing — HTTPS, routing, and persistent data. Rebuilding that per project is slow and makes every app harder to run.
My contribution
I designed and set up the shared service layer so application repositories stay focused on their own logic and simply join the platform network.
Architecture
Oracle VPS
Nginx reverse proxy + automatic TLS
nginx-proxy · acme-companion · :443
ai_platform network
Gmail Assistant
FastAPI · LangGraph
Portfolio site
static · no DB access
Future agents
planned — not deployed
PostgreSQL 17
shared · persistent volume
External services
Gmail / Pub/Sub
Telegram
OpenAI
Technology
- Docker Compose
- External Docker network: ai_platform
- PostgreSQL 17 (persistent volume)
- nginxproxy/nginx-proxy
- nginxproxy/acme-companion (Let's Encrypt)
- pgAdmin
Key design decisions
Separate services, not one image
The reverse proxy, certificate companion, PostgreSQL, and pgAdmin run as separate services in Compose. Each can be updated or restarted independently.
Application code apart from infrastructure
Apps live in their own repositories and containers, joining the shared ai_platform network. Hostname-based routing and certificates are handled by the proxy layer through container environment variables.
Reuse persistence and HTTPS
A single PostgreSQL 17 service with persistent storage and automatic TLS are shared across projects, so launching a new app is mostly configuration.
Localhost-only admin surfaces
PostgreSQL and pgAdmin host bindings are limited to localhost, so they are not exposed publicly.
Capabilities & limitations
Implemented
- Hostname-based routing to independent app containers
- Automatic Let's Encrypt certificates
- Shared persistent PostgreSQL 17
Limitations
- A single VPS simplifies operations but is not a highly available, multi-region platform
- Database isolation, backup automation, monitoring, and disaster recovery are not described as implemented
Have a workflow worth automating?
I'm interested in AI-focused roles and conversations about building useful, practical agentic AI systems.