Local Test Environment Deploy 🧪

This article explains the local deployment test helpers used to develop and test Infinito.Nexus with the development Docker Compose stack.

All scripts are located here:

:backhand_index_pointing_right: https://github.com/kevinveenbirkenbach/infinito-nexus/tree/master/scripts/tests/deploy/local

They allow you to:

  • Deploy a single app
  • Deploy all apps
  • Quickly iterate on one app
  • Reset your local test environment
  • Clean up container state

These scripts are primarily intended for Infinito.Nexus developers.


:warning: Safety Notice

Some scripts delete data inside the running container, including:

  • Inventories
  • App entities
  • Web configuration
  • /var/lib/infinito

Always make sure you understand what a script does before running reset or cleanup commands.


Requirements :puzzle_piece:

The local development environment is primarily tested on:

Manjaro Linux.

It may also work on:

  • Debian
  • Ubuntu
  • Fedora
  • Other Linux distributions
  • macOS / Windows (usually via VM)

However, non-Manjaro systems are not officially optimized or regularly tested.
For the most predictable experience, using Manjaro (or a Linux VM) is recommended.

Required Tools

  • Docker
  • Docker Compose
  • jq
  • make

Before using the test scripts:

make bootstrap
make dev-environment-bootstrap

Run all commands from the repository root.


Test Comparison Table :receipt:

The main difference between these commands is which inventory file they use and whether they recreate or reuse it.

Command Scope Uses inventory file Creates inventory Deploys Destructive?
make test-local-full all apps ${INVENTORY_DIR}/${TEST_DEPLOY_TYPE}.yml :white_check_mark: :white_check_mark: :cross_mark:
make test-local-reset all apps ${INVENTORY_DIR}/${TEST_DEPLOY_TYPE}.yml :white_check_mark: :cross_mark: :white_check_mark: (wipes inventory)
make test-local-rapid 1 app ${INVENTORY_DIR}/${TEST_DEPLOY_TYPE}.yml :cross_mark: :white_check_mark: :cross_mark:
make test-local-rapid-fresh 1 app ${INVENTORY_DIR}/${TEST_DEPLOY_TYPE}.yml :cross_mark: :white_check_mark: :warning: (purges entity first)
make test-local-app APP=web-app-nextcloud 1 app ${INVENTORY_DIR}/servers.yml :white_check_mark: :white_check_mark: :cross_mark:
make test-local-dedicated 1 app ${INVENTORY_DIR}/servers.yml :white_check_mark: :white_check_mark: :warning: (purges shared entity)
make test-local-run-all all apps ${INVENTORY_DIR}/servers.yml :cross_mark: :white_check_mark: :cross_mark:
make test-local-cleanup n/a n/a n/a n/a :white_check_mark: (deletes state)

Quick Start :rocket:

Deploy a Single App (Recommended)

make test-local-app APP=web-app-nextcloud

This will:

  • Start the dev stack (if needed)
  • Create an inventory
  • Deploy the selected app

Fast Iteration on One App

If you already have an inventory and just want to redeploy one app quickly:

make test-local-rapid APP=web-app-nextcloud

Use test-local-rapid-fresh if you want to purge the app first.


Deploy All Apps

For a full local test:

make test-local-full

This discovers all apps, creates the inventory, and deploys everything.


Reset Environment

If things are broken or you want a clean start:

make test-local-reset

This recreates the inventory but does not deploy.


Cleanup

To remove local container state completely:

make test-local-cleanup

:warning: This is destructive.


:locked_with_key: Trust the Local CA (Important)

After a successful local deployment, you must trust the Certificate Authority generated by the Infinito container.

Otherwise, your browser will not allow access to apps under:

https://<app>.infinito.example

Run:

make trust-ca

Then restart your browser.

Only after trusting the local CA will the *.infinito.example domains work correctly over HTTPS.


When to Use What

Situation Recommended Command
First local deploy make test-local-app
Quick app iteration make test-local-rapid
Full integration test make test-local-full
Reset inventory make test-local-reset
Clean everything make test-local-cleanup

Summary

The local deploy test scripts are the main developer tooling for validating:

  • Roles
  • App integrations
  • Deployment logic
  • Docker setup
  • Cross-app dependencies

Use them for fast feedback during development and for full-stack verification before merging changes.