Skip to content

User Story: Migration to VM-Based Deployment With Automated CI/CD #190

@PhilipWoulfe

Description

@PhilipWoulfe

Title:

As a developer and operator, I want my application to run inside a dedicated VM with an automated deployment pipeline so that updates are reliable, repeatable, and never impact the Proxmox host.
Problem / Pain Points

The application currently runs inside an unprivileged LXC, causing Docker to run in rootless mode and leak processes onto the Proxmox host.

This results in:

    host-level Docker daemons spawning

    veth storms and CNI bridges on the host

    kernel log spam

    instability when containers crash

Deployments require:

    manually editing .env files

    manually running docker compose up

    SSHing into the container

The process is error‑prone, slow, and not suitable for production.

Goal / Outcome

Move the application into a dedicated VM and implement a zero‑touch deployment pipeline so that:

Docker runs safely inside the VM, isolated from the host.

The Proxmox node remains stable regardless of app failures.

Deployments happen automatically on push or tag.

Environment variables are managed centrally and securely.

No manual SSH or docker compose up is required.

Acceptance Criteria
Infrastructure

A new VM is created (Ubuntu or Debian).

Docker and Docker Compose are installed inside the VM.

The VM is configured with:

    static IP

    firewall rules

    persistent storage

    automatic updates for security patches

Application Deployment

The application runs via Docker Compose inside the VM.

The VM is the only place where the app runs.

No Docker processes appear on the Proxmox host.

CI/CD Pipeline

A Git repository contains:

    Dockerfile

    docker-compose.yml

    environment template

A pipeline (GitHub Actions, GitLab CI, or similar):

    builds the image

    pushes to a registry

    triggers a deploy on the VM

The VM pulls the new image and restarts the stack automatically.

Environment Management

Environment variables are stored in:

    a .env file managed by the pipeline, or

    a secrets manager (Vault, Doppler, GitHub Secrets, etc.)

No manual editing of .env on the server.

Deployment Flow

Developer pushes to main or tags a release.

CI builds and publishes the image.

VM receives a webhook or SSH trigger.

VM runs docker compose pull && docker compose up -d.

Deployment completes without manual intervention.

Non‑Functional Requirements

Deployment must be repeatable and idempotent.

VM must remain isolated from the Proxmox host.

Logs must be accessible centrally (e.g., Loki, ELK, or simple journald + docker logs).

Rollbacks must be possible by redeploying a previous image tag.

Success Metrics

Zero Docker processes on the Proxmox host.

Zero manual SSH steps for deployment.

Deployment time reduced to under 1 minute.

No kernel log spam or veth churn during app crashes.

VM uptime remains stable even during app failures.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions