Skip to content

Efficiently delete preview apps using standard naming. Ensure database (MongoDB) with same name exists on specified server URL. Streamline app and database management.

Notifications You must be signed in to change notification settings

CodeForAfrica/dokku-plugins

Repository files navigation

Dokku Plugins

Various Dokku plugins used to develop and manage software at Code for Africa.

Available Plugins

pr-db-mongo

Prerequisites

  • Dokku
  • Python
  • Mongo Database Tools.

    To install mongo database tools,

    wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add -
    echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list
    sudo apt-get update
    sudo apt-get install -y mongodb-org

Installation

The .tgz installation via dokku plugin:install file:// or https:// seem to fail. We shall therefore use the manual installation until a fix is found.

Copy the plugin(s) to dev

Copy the .tgz from the local/CI instance to the dev machine (running Dokku)

scp plugin.tgz user@remotehost:/path-to-copy-file

For example, if our plugin is called pr-db-mongo, then:

scp build/pr-db-mongo.tgz ubuntu@dev.codeforafrica.org:/~

Make the plugin available to Dokku

ssh to the dev machine

ssh ubuntu@dev.codeforafrica.org:

Extract and copy plugin into $PLUGIN_AVAILABLE_PATH

tar -xf pr-db-mongo.tgz
chown dokku:dokku -R pr-db-mongo
mv pr-db-mongo /var/lib/dokku/plugins/available

Enable the plugin

sudo dokku plugin:enable plugin-name

Install Plugin

sudo dokku plugin:install

Install Dependencies

sudo dokku plugin:install-dependencies

That's it. Happy coding!

Usage

Contributing

About

Efficiently delete preview apps using standard naming. Ensure database (MongoDB) with same name exists on specified server URL. Streamline app and database management.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •