Quickstart#

Ok, so you have Unholy, what do you do with it?

Make a Project#

An Unholy-native project will contain both an Unholyfile and a Compose file.

If we follow the Try Docker Compose guide, we’ll end up with a compose file like this:

compose.yaml#
services:
  web:
    build: .
    ports:
      - "8000:5000"
  redis:
    image: "redis:alpine"

Additionally, the absolute minimum Unholyfile is this:

Unholyfile#

You can actually skip creating an Unholyfile, and it’ll be equivalent.

Spawn your Environment#

With the basic files out of the way, you can ask unholy to create an environment:

$ unholy new --name demo git@github.com/YOU/YOURPROJECT.git

A lot of text will go by as Unholy creates the workspace, clones the repo, starts compose services, and creates & configures your development environment.

This will create a vanilla Debian environment with pretty minimal utilities. (Really, just enough for Unholy to work and a few utilities for humans.)

Access Your Environment#

Ok, so you’ve got this shiny development environment sitting on a computer somewhere. It doesn’t do you any good if you can’t access it.

In order to open Neovide and a shell, use these:

$ unholy neovide demo
$ unholy shell demo
root@demo:/workspace#

These two commands do related things:

  • unholy neovide opens Neovide and connects it to neovim running in the development environment

  • unholy shell drops you into bash inside the development environment

Customizing You Environment#

Ok, so one of the cool things about containers is recreatable artifacts and environments, and Unholy is no exception.

In summary, the Unholyfile is a script with some TOML headmatter. The framework would look something like:

Unholyfile#
1---
2---
3#!/bin/sh
4set -e

Pick an Image#

Since this is a Python project, let’s start with a Python environment.

Unholyfile#
1---
2[dev]
3image = "python:3"
4---
5#!/bin/sh
6set -e

Note

The container image must be Debian-based.

Add Some Dependencies#

Most projects have some dependencies that need to happen: test runners, git tooling, etc. Let’s install them.

Unholyfile#
1---
2[dev]
3image = "python:3"
4---
5#!/bin/sh
6set -e
7pip install -r requirements.txt
8pip install pytest

Note

Since this is a dedicated, single-purpose environment, you do not need to use a Python virtual environment or similar.

Recreate the Environment#

Since we’ve changed the Unholyfile (in particular, we’ve changed the base image), we need to recreate the environment:

$ unholy remake demo

This will recreate the development environment without touching your workspace files. Note that any open shell or Neovim sessions will be uncerimoniously closed, so make sure that your work is saved.