Giter Club home page Giter Club logo

sprout's Introduction

Sprout

Fast, deduplicated content and database seeding for WordPress.

Documentation | Install | Releases

GitHub Release Documentation Build Test Status


  • Store your uploads and database in a secure, central location and easily let your team get up and running with the correct version of content with a one-liner - sprout seed.

  • Sprout lets you commit a small sprout.yaml file as part of your WordPress project. It identifies the exact version of database and wp-uploads content required in order to seed a new environment.

  • You can store your database and content in a Sprout repo - this can be a local path, SFTP, S3 bucket, or any number of supported backends via OpenDAL or rclone. Have complete control over your data.

  • Your data is encrypted and deduplicated, and stored in the proven and trusted Restic format. So much more efficient than chucking ZIPs around.

  • Sprout is FAST. Written in Rust, and provided as a single static binary, it will run anywhere.

  • Sprout will locally stash your current database and wp-uploads during destructive operations - a nice safety net to have!


โš ๏ธ Although I think you'll love it, Sprout is pre-release. You should always back up your WordPress content and database before using Sprout.


asciicast

Installation

Binaries are avalailable for Mac and Linux on both x86_64 and arm64. You can get them via the releases page.

Mac

# x86_64 / Intel Macs
curl -L "https://github.com/talss89/sprout/releases/latest/download/sprout-macos-x86_64.tar.gz" | tar zxf - && sudo install -c -m 0755 sprout /usr/local/bin

# aarch64 / M1 Macs
curl -L "https://github.com/talss89/sprout/releases/latest/download/sprout-macos-aarch64.tar.gz" | tar zxf - && sudo install -c -m 0755 sprout /usr/local/bin

Linux

# x86_64
curl -L "https://github.com/talss89/sprout/releases/latest/download/sprout-linux-x86_64.tar.gz" | tar zxf - && sudo install -c -m 0755 sprout /usr/local/bin

# aarch64 / amd64
curl -L "https://github.com/talss89/sprout/releases/latest/download/sprout-linux-aarch64.tar.gz" | tar zxf - && sudo install -c -m 0755 sprout /usr/local/bin

Windows support is untested, and will require compilation with cargo.

What's going on behind the scenes?

Sprout stores your data in the Restic Repo Format, and uses rustic-rs/rustic_core internally. We dump the database via WP CLI, and replace the site URL with a placeholder value before storing it alongside an encrypted and de-duplicated archive of your wp-uploads folder.

Sprout rewrites the Restic hostname and path properties of each snapshot so your team can snap and seed seamlessly. Content branches are implemented as a virtual directory inside a snapshot.

sprout's People

Contributors

talss89 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

sprout's Issues

test: integration test suite

This, on the face of it, seems complex due to the need to interact with WP-CLI, WP Database, and Git.

  • Declare a Fact trait which we can use as an interface between a project and WP-CLI + Git. This could solve the problem of setting up a full WP environment.
  • Build a module to build separate test contexts to include a SPROUT_HOME and local repo
  • Provide fake WordPress uploads content to snapshot

feature: label and describe snapshots

  • Optionally label a snapshot with text.
  • Optionally save a description.
  • Show label in ls table
  • Create a new command to show snapshot information sprout describe <id>, including description

docs: planning and improvements

The docs are lacking at the moment! This issue tracks all of the things we'd like to include.

  • reference: internals (sprt_ tagging, uniqueness digest, branch parents)
  • guide: repo management / maintenance
  • guide: stashes
  • guide: branching
  • reference: sprout.yaml format
  • guide: using onedrive
  • guide: using dropbox
  • guide: using google drive
  • guide: using restic http server
  • guide: sftp

docs: installation, guides, reference docs

  • Clap inline docs - review
  • docs: installation instructions
  • readme: point to proper docs
  • guide: S3
  • guide: Setting up a repo
  • guide: Snapshotting a project
  • guide: Using branches
  • guide: Seeding from a snapshot
  • guide: Environment vars in repo definition
  • docs: how to use / what is it

feature: mechanism for managing remote repositories

Currently all remote repo information is stored in a project's sprout.yaml. This isn't great, as we may want to have credentials for cloud storage set up as part of repository's options object.

This feature will address the shortcoming by implementing:

  • Individual repository configs stored in ~/.sprout/repos
  • Support env var expansion in ~/.sprout/repos/<repo-label>.yaml
  • sprout.yaml should only refer to the repo by label

Command Changes

  • sprout repo list - List all available repos
  • sprout repo new - Create new repo file and open default editor
  • sprout repo get <repo-label> - Return repo information for <repo-label>
  • sprout repo init should be changed to require a repo-label not a path

Feedback for rustic_core (DX)

Hey there,
as you are an early user of rustic_core, we would like to understand better how the API of rustic_core fares you. Do you have any feedback, do you miss anything? :-)

roadmap: path to 1.0.0

This issue serves as a planning scratchpad to bring Sprout up to a stable 1.0.0 release.

<0.1.1: For next pre-release

???

<1.0.0: For stable

  • #19
  • build: windows
  • feature: installer for windows

Backlog / Ideas(?)

  • feature?: repo access token management
  • feature?: share repo definitions
  • feature?: punch-in for user passwords
  • feature?: DB anonymisation - out of scope

Wider discussion

Although I made this for WordPress, there's no reason why this approach wouldn't work for other software projects that depend on large content storage.

There are some specialisations for WordPress (DB search replace on site URL for example) that would need to be abstracted away. Other types of project would likely have similar specifics.

Is it worth planning to turn Sprout into a general content seeding and storage tool?

And if so, at what point do we do that?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.