---
kind: Service
name: web-app-lxc
namespace: prod

runtime:
  one_of: pve-ct
  image: local:vztmpl/ubuntu-24.04

resources:
  cpu_millicores: 500
  memory_mib: 512
  disk_mib: 2048

ports:
  - name: http
    port: 8080
    protocol: tcp

constraints:
  - "node.kind == 'proxmox'"

restart:
  mode: service
  max_retries: 3
  delay: 10s

health:
  interval: 30s
  timeout: 5s
  path: /healthz

tasks:
  - name: web
    runtime:
      command: "/bin/bash -c 'apt-get update && apt-get install -y nginx && nginx -g 'daemon off;'"
    ports:
      - name: http
        port: 8080
        protocol: tcp
---
# Web App (LXC container variant)
# Deploys as a Proxmox LXC container via `pct create`.
# Requires --target <proxmox-node> and the LXC template
# (auto-downloaded during `orca node join --type proxmox`).
