Node.js Docker Automation Self-Hosted

Penpot Updater

A Node.js based utility to update self-hosted Penpot applications securely and automatically without pulling docker-compose configurations each time.

Release v1.0.0
April 2024

Penpot Updater

Managing self-hosted applications can sometimes be tedious, especially when updates require repetitive manual steps. Penpot is a fantastic open-source design tool, but upgrading an existing self-hosted instance typically involves pulling the latest docker-compose configurations and restarting containers.

Penpot Updater is a streamlined Node.js CLI utility designed to automate this process.

The Problem

When running a self-hosted Penpot instance via Docker, updating to the latest release usually means:

  1. Navigating to the directory holding your docker-compose.yaml.
  2. Verifying the latest version tags online.
  3. Manually updating the .env or docker-compose.yaml files.
  4. Pulling the latest images explicitly.
  5. Recreating the containers.

Doing this manually every time a new version is released is time-consuming and prone to human error (such as missing a database migration step or typo in version tags).

The Solution

Penpot Updater automates these tasks into a single executable command. Written purely in Node.js, it interfaces directly with the Docker daemon and Penpot’s GitHub releases to keep your instance up to date smoothly.

Features

  • Hands-free Updates: Run a single command to bump your Penpot instance to the latest stable release.
  • Docker Integration: Uses the local Docker socket to automatically fetch matching images and restart necessary services.
  • Config Preservation: Safely maintains your environmental variables without overwriting sensitive custom configurations.
  • Rollback Capability: Can easily revert back to the last known working image state if an update causes unexpected behavior.

This project reduces maintenance overhead and demonstrates effective scripting for Docker environments using JavaScript.