frafra / docker-discourse

Dockerized Discourse Forum

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

github.com/tiredofit/docker-discourse

GitHub release Build Status Docker Stars Docker Pulls Become a sponsor Paypal Donate


About

This will build a Docker Image for Discourse - A web based discussion forum.

  • Unlike the official Discourse image, this is meant to be self contained without requiring a base image or use the launcher
  • Additional Plugins installed
  • Flexible Volatile Storage

Changelog

Maintainer

Table of Contents

Prerequisites and Assumptions

  • Assumes you are using some sort of SSL terminating reverse proxy such as:
  • Requires access to a Postgres Server
  • Requires access to a Redis Server

Installation

Build from Source

Clone this repository and build the image with docker build -t (imagename) .

Prebuilt Images

Builds of the image are available on Docker Hub

docker pull docker.io/tiredofdit/discourse:(imagetag)

Builds of the image are also available on the Github Container Registry

docker pull ghcr.io/tiredofit/docker-discourse:(imagetag)

The following image tags are available along with their tagged release based on what's written in the Changelog:

Container OS Tag
Debian :latest

Configuration

Quick Start

The first boot can take from 2 minutes - 5 minutes depending on your CPU to setup the proper schemas.

  • You'll need to create a new user by going inside the container and executing bundle exec admin:create - then once complete visiting https://yoursitename/admin and logging in to bypass the welcome screen.

Persistent Storage

The container operates heavily from the /app folder, however there are a few folders that should be persistently mapped to ensure data persistence. The following directories are used for configuration and can be mapped for persistent storage.

Directory Description
/data/logs Logfiles
/data/uploads Uploads Directory
/data/backups Backups Directory
/data/plugins Plugins Driectory

Base Images used

This image relies on a Debian Linux base image that relies on an init system for added capabilities. Outgoing SMTP capabilities are handlded via msmtp. Individual container performance monitoring is performed by zabbix-agent. Additional tools include: bash,curl,less,logrotate,nano.

Be sure to view the following repositories to understand all the customizable options:

Image Description
OS Base Customized Image based on Debian Linux
Nginx Nginx webserver

Container Options

Parameter Description Default
BACKUP_PATH Place to store in app backups {DATA_PATH}/backups/
ENABLE_DB_MIGRATE Enable DB Migrations on startup TRUE
ENABLE_MINIPROFILER Enable Mini Profiler FALSE
ENABLE_PRECOMPILE_ASSETS Enable Precompiling Assets on statup TRUE
SETUP_MODE Automatically generate config based on these environment variables AUTO
ENABLE_CORS Enable CORS FALSE
CORS_ORIGIN CORS Origin ``
UPLOADS_PATH Path to store Uploads {DATA_PATH}/uploads/

Log Options

Parameter Description Default
LOG_FILE Discourse Log File discourse.log
LOG_LEVEL Discourse Log Level info
LOG_PATH Path to store logfiles {DATA_PATH}/logs/
PUMA_LOG_FILE Puma Log puma.log
PUMA_LOG_FILE_ERROR Puma Error Log puma_error.log
SIDEKIQ_LOG_FILE SideKiq Log sidekiq.log

Performance Options

Parameter Description Default
PUMA_THREADS Minimum and Maximum Threads 8,32
PUMA_WORKERS How many Workers 4
SIDEKIQ_THREADS Sidekiq Concurrency 25

Path Options

Database Options

Postgresql
Parameter Description Default
DB_POOL How many Database connections 8
DB_PORT Database Port 5432
DB_TIMEOUT Timeout for established connection in seconds 5000
DB_TIMEOUT_CONNECT Connection Timeout in Seconds 5
DB_USER Username of Database
DB_NAME Database name
DB_PASS Database Password
DB_HOST Hostname of Database Server
Redis
Parameter Description Default
REDIS_DB Redis Database Number 0
REDIS_ENABLE_TLS Enable TLS when communication to REDIS_HOST FALSE
REDIS_PORT Redis Host Listening Port 6379
REDIS_SKIP_CLIENT_COMMANDS Skip client commands if unsupported FALSE

SMTP Options

Parameter Description Default
SMTP_AUTHENTICATION SMTP Authentication type plain login plain
SMTP_DOMAIN HELO Domain for remote SMTP Host example.com
SMTP_HOST SMTP Hostname postfix-relay
SMTP_PORT SMTP Port 25
SMTP_START_TLS Enable STARTTLS on connection TRUE
SMTP_TLS_FORCE Force TLS on connection FALSE
SMTP_TLS_VERIFY TLS Certificate verification none

Plugins

Parameter Description Default
PLUGIN_PATH Path where plugins are stored {DATA_PATH}/plugins/
PLUGIN_ENABLE_ASSIGN FALSE
PLUGIN_ENABLE_CHAT_INTEGRATION FALSE
PLUGIN_ENABLE_CHECKLIST FALSE
PLUGIN_ENABLE_DETAILS TRUE
PLUGIN_ENABLE_EVENTS FALSE
PLUGIN_ENABLE_FOOTNOTE FALSE
PLUGIN_ENABLE_FORMATTING_TOOLBAR FALSE
PLUGIN_ENABLE_LAZY_YOUTUBE TRUE
PLUGIN_ENABLE_LOCAL_DATES TRUE
PLUGIN_ENABLE_MERMAID FALSE
PLUGIN_ENABLE_NARRATIVE_BOT TRUE
PLUGIN_ENABLE_POLLS TRUE
PLUGIN_ENABLE_POST_VOTING FALSE
PLUGIN_ENABLE_PRESENCE TRUE
PLUGIN_ENABLE_PUSH_NOTIFICATIONS FALSE
PLUGIN_ENABLE_SAME_ORIGIN FALSE
PLUGIN_ENABLE_SOLVED FALSE
PLUGIN_ENABLE_SPOILER_ALERT FALSE
PLUGIN_ENABLE_STYLEGUIDE TRUE
PLUGIN_ENABLE_VOTING FALSE

Networking

The following ports are exposed.

Port Description
3000 Rails

Maintenance

Shell Access

For debugging and maintenance purposes you may want access the containers shell.

bash docker exec -it (whatever your container name is) bash

Support

These images were built to serve a specific need in a production environment and gradually have had more functionality added based on requests from the community.

Usage

  • The Discussions board is a great place for working with the community on tips and tricks of using this image.
  • Consider sponsoring me for personalized support

Bugfixes

  • Please, submit a Bug Report if something isn't working as expected. I'll do my best to issue a fix in short order.

Feature Requests

  • Feel free to submit a feature request, however there is no guarantee that it will be added, or at what timeline.
  • Consider sponsoring me regarding development of features.

Updates

  • Best effort to track upstream changes, More priority if I am actively using the image in a production environment.
  • Consider sponsoring me for up to date releases.

License

MIT. See LICENSE for more details.

References

About

Dockerized Discourse Forum

License:MIT License


Languages

Language:Dockerfile 100.0%