Skip to content

Application Runtimes & Backends

In addition to the core Supabase and Nginx stacks, the Planovi VPS executes application runtimes catering to distinct technological domains: PHP 8.3 FPM microservices, compiled Flutter Web dashboards, and asynchronous Python FastAPI converter backends.


🐘 PHP 8.3 Microservices Runtime (php-app)

The php-app container executes business web services for customer inquiry intake (dealflow.planovi.app) and appointment scheduling (scheduler.planovi.app).

Docker & Environment Specifications

  • Context: ./php-app/Dockerfile
  • Base Image: php:8.3-fpm-alpine
  • Extensions Installed: pdo_mysql, curl, mbstring, openssl, json.
  • Filesystem Mount: /opt/vps-apps mounted into the container at /var/www/apps.
  • Nginx Bridge: Internal Nginx instance or FastCGI socket listening on port 80 communicating with vps-proxy.

Virtual Host Segregation in nginx-php.conf

# Dealflow Subdomain
server {
listen 80;
server_name dealflow.planovi.app;
root /var/www/apps/microservices/prod/dealflow;
index index.php;
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}
# Scheduler Subdomain
server {
listen 80;
server_name scheduler.planovi.app;
root /var/www/apps/microservices/prod/scheduler;
index index.php;
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}

📱 Flutter Web Static Server (flutter-web)

The Flutter management dashboard (panel.planovi.app and dev-panel.planovi.app) is compiled ahead of time (AOT) to web assets (index.html, main.dart.js, CanvasKit WebAssembly bundles).

Runtime Configuration

  • Image: nginx:alpine
  • Volume Mount: /opt/vps-apps/flutter-app/prod/build/web mounted read-only at /usr/share/nginx/html.
  • Single Page App Routing: Nginx handles client-side routing via HTML5 History API:
    location / {
    try_files $uri $uri/ /index.html;
    }
  • Caching Headers: Long-lived Cache-Control: public, max-age=31536000, immutable for versioned JS/Wasm chunks, with no-cache for index.html.

🐍 Converter FastAPI Backends (converters-api-*)

The IoT Edge Converter cloud backend (cloud.planovi.app) provides asynchronous device management, firmware binary downloads, and configuration endpoints.

Dual-Environment Architecture

Service ContainerCode DirectoryDatabase URL TargetExposed Port
converters-api-prod/opt/vps-apps/converters/prodpostgresql+asyncpg://.../postgresInternal 8000
converters-api-dev/opt/vps-apps/converters/devpostgresql+asyncpg://.../postgresInternal 8000

Inline Dockerfile Runtime

Containers build directly from the checked-out source code using inline definitions in docker-compose.yml:

FROM python:3.13-slim
ENV PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1 PYTHONPATH=/app
WORKDIR /app
COPY cloud/requirements.txt /app/cloud/requirements.txt
RUN python -m pip install --no-cache-dir -r /app/cloud/requirements.txt
COPY cloud /app/cloud
CMD ["python", "-m", "uvicorn", "cloud.app:app", "--host", "0.0.0.0", "--port", "8000"]

These containers depend on supabase-db being healthy before starting up.