Code Monkey home page Code Monkey logo

ansible-discourse's Introduction

Deploy Discourse using Ansible

Easily deploy Discourse with Ansible (and without Docker). Several operating systems are supported, including CentOS, Debian, Fedora and Ubuntu. You don’t need any knowledge of Ansible (but it’s recommended).

ansible-discourse deploys a similar software stack to the official Discourse Docker image, including PostgreSQL, Redis, NGINX and Ruby (via rbenv).

Don’t report issues to meta.discourse.org. Instead, open a new issue here.

Bonus features:

  • Integrate with systemd for service management and isolation.
  • Zero-downtime Unicorn restarts even after upgrading Ruby via rbenv (so downtime is rare).
  • Install Unbound as a local DNS resolver with DNSSEC validation.
  • Install Postfix and OpenDKIM to send emails (so no third-party service is required).
  • Don’t install pngout as it’s not free software.

Is this for me?

The Discourse team only supports installation via Docker. ansible-discourse may suit you if:

  • you already manage your servers with Ansible
  • you want more flexibility over your production environment
  • you don’t want to run an OS (Docker container) inside an OS (virtual machine) inside an OS
  • you need more secure isolation (eg, hardware virtualization) than Docker can provide (as containers do not contain)

Important notes

  • I cannot provide any guarantees. If you need guaranteed uptime but aren’t an experienced system administrator, consider purchasing premium support from Discourse.org.
  • In some cases, external package repositories are used.

Quickstart

Step 1: Install Ansible

You have two options:

Step 2: Configure playbook

Login via SSH to your server. Get started with vars_example.yml_.

$ git clone https://github.com/jamielinux/ansible-discourse
$ cd ansible-discourse
$ cp vars_example.yml group_vars/all/main.yml
$ vim group_vars/all/main.yml

Step 3: Mail server

Discourse needs to be able to send notification emails. You have two options:

Step 4: Deploy

The very first run will take 10-25 minutes depending on your hardware. A good chunk is spent compiling Ruby, so En Garde!

$ sudo ./deploy-local.sh

You should configure a firewall with ports 22, 80 and 443 open. You should also enable automatic system updates. Consult your operating system documentation for instructions.

Updating

By default, the latest stable Discourse release is installed. When a new version is released, simply re-run deploy-local.sh. Re-runs are much faster than the first run, as Ansible skips completed tasks (eg, Ruby doesn’t need to be compiled again).

$ cd ansible-discourse
$ git pull
$ sudo ./deploy-local.sh

Further configuration

ansible-discourse's People

Contributors

jamielinux avatar

Watchers

 avatar  avatar  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.