Work in Progress

Vagrant and VirtualBox are referenced here, but there are better alternatives. I suggest looking at QEMU or just using an actual remote server.

Dependencies:

Install chillbox Python script.

python -m pip install chillbox

Download or build the chillbox-server distribution file.

# Build it
(cd chillbox-server
make dist
)

# Or download and extract it
# TODO Host the dist file somewhere
wget ...
tar -x -f ...
# Use a Python virtual environment and install these locally.
python -m venv .venv
source .venv/bin/activate
python -m pip install -r chillbox-server/requirements.in

# Create a chillbox.toml to edit.
cp -i chillbox-server/example-chillbox.toml chillbox.toml

# Use the 'example' site for the sites artifact URL.
# The 'chillbox-sites' directory is a path that is uploaded in chillbox.toml
./chillbox-server/build-sites-artifact.sh -s "example" -o chillbox-sites -u chillbox.toml

## Optional
## Install certbot and register the account interactively on the local machine.
#./chillbox-server/register-certbot-account.sh

chillbox init

# Create the user-data script and force recreating it.
chillbox -v server-init -f

# Provision a new VM that will run that user-data script.
cp -i chillbox-server/example-Vagrantfile Vagrantfile
vagrant up
# Double tap in case it failed.
vagrant up --provision

# Upload the files to the VM.
chillbox -v upload

# Login and switch to root user.
ssh -F "$(chillbox ssh-unlock)" local
doas su -l

## Optional
## Create a local s3 object store on the VM.
#set -a; . /home/alice/minio-env.sh; set +a
#/etc/chillbox/bin/install-minio.sh

# Initialize the chillbox services and start the sites.
/etc/chillbox/bin/chillbox-init.sh
rc-status | grep site1

# Some of the services may not start if they need secrets. Doing another upload
# now should resolve that since the watcher for that should be started.
# Back on the host:
chillbox -v upload

# Set the site1.example.test for 127.0.0.1 in your /etc/hosts file.
# Check the deployed site at http://site1.example.test:8080/
https://git.sr.ht/~jkenlooper/chillbox