Skip to content

netologist/denv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

denv: Local Development Environment Manager

denv is a CLI tool designed to standardize and simplify local development workflows using Docker, Devcontainers, and Traefik. It provides a Kubernetes-like namespace experience for local Docker Compose projects.

Features

  • Project Namespaces: Isolate projects with their own networks and domains (e.g., *.fintech.localhost).
  • Dynamic Routing: Automatic Traefik configuration for apps and services.
  • Service Management: Easily add shared services like Postgres, Redis, RabbitMQ.
  • Observability: One-click setup for Grafana, Loki, and Promtail.
  • Devcontainers: Ready-to-use templates for Go, Python, Node.js, Java, and Rust.
  • Context Switching: Smart context detection based on your current directory.
  • Local Registry: Integrated local container registry.
  • SSL/TLS: Automatic locally trusted certificates via mkcert.

Prerequisites

Before installing denv, ensure you have:

  • Docker (Docker Desktop, Colima, or Podman)
  • Python 3 (for state management)
  • Git (for cloning the repository)
  • mkcert (optional, for HTTPS support)

Check Prerequisites

You can automatically check and install prerequisites:

# Download and run the prerequisites checker
curl -fsSL https://raw.githubusercontent.com/netologist/denv/main/scripts/check-prerequisites.sh | bash

Or if you've already cloned the repo:

./scripts/install.sh denv

Installation

Quick Install (Recommended)

Install with a single command:

curl -fsSL https://raw.githubusercontent.com/netologist/denv/main/scripts/quick-install.sh | bash

Manual Install

# Clone the repository
git clone https://github.com/netologist/denv.git ~/.denv

# Run the installer
~/.denv/scripts/install.sh

# Restart your shell
source ~/.zshrc  # or ~/.bashrc

Post-Installation

After installation, verify by running:

denv --help

Quick Start

  1. Initialize the System:

    denv system up
  2. Create a Project:

    denv init my-project
    denv switch my-project
  3. Create an App:

    denv create-app backend --template go
  4. Start Developing:

    denv jump backend
    denv up

    Your app is now running at http://backend.my-project.localhost.

Documentation

See walkthrough.md for a detailed guide.

Directory Structure

~/.denv/              # Global installation
├── bin/              # CLI executable
├── templates/        # Service and App templates
└── services/         # Global system services (Traefik, Registry)

my-project/           # Your Project
├── .env              # Project configuration
├── apps/             # Your applications
│   └── backend/
├── platform/         # Infrastructure
│   ├── services/     # (Postgres, Redis, etc.)
│   └── observability/# (Grafana, Loki)
└── templates/        # Custom project templates

Requirements

  • Docker (Docker Desktop, Colima, or Podman)
  • Python 3 (for state management)
  • mkcert (optional, for SSL)

About

Local Development Environment Manager

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published