Git Product home page Git Product logo

dokku-discourse's Introduction

dokku-discourse

Test Publish

Manages discourse apps on your dokku server.

Plugin installation

# For dokku >= v0.22.0
dokku plugin:install https://github.com/badsyntax/dokku-discourse.git

# For dokku < v0.22.0
dokku plugin:install https://github.com/badsyntax/dokku-discourse.git --committish 0.2.1

Plugin update

dokku plugin:update discourse

Commands

discourse:help                            # Shows help
discourse:create <app>                    # Creates/rebuilds a discourse app
discourse:destroy <app>                   # Destroys a discourse app
discourse:upgrade <app>                   # Upgrades a discourse app
discourse:install-plugin <app> <git_url>  # Installs a plugin for a discourse app
discourse:list                            # Lists discourse apps

Usage

Create a new discourse app

Each discourse app is a separate standalone discourse instance.

dokku discourse:create discourse-app

A new docker image will be built and this process can take some time.

You'll be prompted for various discourse configuration values.

Data will be stored in location /var/lib/dokku/data/storage/APP_NAME.

Once your app is built & deployed, you can treat it as any other dokku app. You should use the dokku-letsencrypt plugin for adding TLS.

Continue with the offical discourse install instructions to complete the discourse installation, ignoring any TLS setup instructions.

Customise the discourse container config

A discourse container config file is created when a discourse app is created. The config is based on standalone.yml.

You can edit the config at /home/dokku/APP_NAME/discourse_standalone.yml. Don't make any changes to the volumes section, but feel free to change anything else.

After making change be sure to run dokku discourse:create <app> to rebuild and re-deploy the discourse app.

Upgrade a discourse app

The easiest way to upgrade is to use the admin.

You can also upgrade a discourse app with the following:

dokku discourse:upgrade discourse-app

The running discourse app will be stopped, the docker image rebuilt and the app redeployed.

Add discourse plugins

Install the akismet plugin:

dokku discourse:install-plugin discourse-app https://github.com/discourse/discourse-akismet

The running discourse app will be stopped, the docker image rebuilt and the app redeployed.

Destroy an app

dokku discourse:destroy discourse-app

Destroying an app does not remove the data directory at /var/lib/dokku/data/storage/APP_NAME.

Uninstall the plugin

dokku plugin:uninstall discourse

Running discourse apps and images are unaffected.

To completely remove everything related to discourse:

  1. Destroy all discourse apps: dokku discourse:destroy $(dokku discourse:list -q)
  2. Uninstall the discourse plugin: dokku plugin:uninstall discourse
  3. Remove the base discourse image: docker rmi $(docker images -q discourse/base)
  4. Remove discourse data directories at /var/lib/dokku/data/storage/.

Restore from backup

You'll need a backup archive created by discourse, and a fresh discourse app.

Follow the instructions above to create a new discourse app. Ensure you've registered an admin account as you'll need to login to the admin to restore the backup. If the backup site was using TLS, you need to set this up on the new instance before continuing (via dokku letsencrypt).

Discourse allows you restore a backup in the admin, but you need to copy the backup into the discourse container first. This is achieved by copying the backup into the host directory that's mounted to the container.

First, ensure the default backup directory exists on the host:

Substitute APP_NAME with the name of the discourse app you just created.

ssh [email protected]
mkdir /var/lib/dokku/data/storage/APP_NAME/backups/default/

Exit your server and use scp (or similar) to copy the archive file to the server.

Substitute APP_NAME with the name of the discourse app you just created.

scp discourse-backup.tar.gz [email protected]:/var/lib/dokku/data/storage/APP_NAME/backups/default/

Login to the admin and restore from backup.

To complete the restoration, you'll need install plugins that were previously installed. Use the dokku discourse:install-plugin command to do so.

Credits

Development

See DEVELOPMENT.md.

License

See LICENSE.md.

dokku-discourse's People

Contributors

badsyntax avatar whollacsek avatar

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.