Discourse auf Ubuntu oder Debian für die Entwicklung installieren

:warning: Diese Anleitung beschreibt die Installation in einer Entwicklungsumgebung. Für eine Anleitung zur Produktionssituation siehe: Install Discourse in production with the official supported instructions


Möchtest du Discourse auf Ubuntu oder Debian einrichten, um daran zu arbeiten und zu entwickeln?

Wir gehen davon aus, dass du lokal arbeitest und Ruby/Rails/Postgres/Redis noch nicht auf deinem Ubuntu- oder Debian-System installiert hast. Legen wir los!

Anforderungen

Wir empfehlen mindestens 4 GB RAM und 2 CPU-Kerne.

Aktuelle Kompatibilität:

Betriebssystem Kompatibilität
Debian 11 :white_check_mark:
Crostini (Linux auf ChromeOS) :white_check_mark:
Ubuntu 22.04 oder neuer :white_check_mark:

Discourse-Abhängigkeiten installieren

Du benötigst folgende Pakete auf deinem System:

** optional

Nachdem wir die Discourse-Abhängigkeiten installiert haben, gehen wir zur Installation von Discourse selbst über.

Discourse klonen

Klone das Discourse-Repository im Ordner ~/discourse:

git clone https://github.com/discourse/discourse.git ~/discourse

~ steht für den Home-Ordner, sodass der Discourse-Quellcode in deinem Home-Ordner verfügbar sein wird.

Datenbank einrichten

Erstelle eine Rolle mit demselben Namen wie dein Linux-Benutzername:

cd /tmp && sudo -u postgres createuser -s "$USER"

[/details]

Discourse bootstrappen

Wechsle in deinen Discourse-Ordner:

 cd ~/discourse

Installiere die benötigten Gems:

source ~/.bashrc
bundle install

Installiere die JS-Abhängigkeiten:

pnpm install

Nachdem du die Gems erfolgreich installiert hast, führe diese Befehle aus:

bin/rails db:create
bin/rails db:migrate
RAILS_ENV=test bin/rails db:create db:migrate

Starte Rails und den Frontend-Bundler:

bin/dev

Falls die Bilder nicht angezeigt werden, verwende stattdessen diesen Befehl:
(Du kannst auch eine IP angeben, wenn du auf einem Remote-Server arbeitest)

DISCOURSE_HOSTNAME=localhost UNICORN_LISTENER=localhost:3000 bin/dev

Du solltest nun in der Lage sein, http://localhost:3000 aufzurufen, um deine lokale Discourse-Installation zu sehen.

Neuer Administrator erstellen

Um einen neuen Administrator zu erstellen, führe folgenden Befehl aus:

bin/rails admin:create

Folge den Aufforderungen, und ein neues Administratorkonto wird erstellt.

E-Mail konfigurieren

Starte MailHog:

mailhog

Herzlichen Glückwunsch! Du bist jetzt der Administrator deiner eigenen Discourse-Installation!

Viel Spaß beim Entwickeln! Um damit zu beginnen, siehe Einsteigeranleitung zum Erstellen von Discourse-Plugins.


Zuletzt überprüft von @blake am 2023-04-03T06:00:00Z


Dieses Dokument ist versionskontrolliert – schlage Änderungen auf GitHub vor.

66 „Gefällt mir“
Docker setup for development
Share your Discourse dev setup
How to open via internal IP?
Discourse as Your First Rails App
Why is my dev server not showing me uploaded images in Topics?
Can I install discourse on my local machine
Unable to Install Discourse for development
Export only database data Postgres (for users, posts and topics)
Rspec failing to load when using the official beginners guide
Jhead and svgo errors while running specs
How to add a new language
Not receiving Activation Email
Moderation Tools
Can't set up dev environment due to cppjieba_rb failing to install
Override profile background via SSO
Issue in setup discourse on ubuntu server
Bitnami Discourse VM on Virtualbox + SMTP mail-server for testing
How do I go about making a very customized theme?
Can't install the bundle
Mini_racer installation issues on ubuntu vagrant (OSX)
How to Install Discourse on LocalHost in Windows?
Migrating a myBB forum to Discourse using Kubuntu in a VM
Migration from Yahoo! Groups
Does the forum for development start up 24 hours*?
How to allow customs hosts in development mode
Help with setting up discourse An error occurred while installing xorcist (1.1.2), and Bundler cannot continue
Any interest in Podman?
Bundler cannot continue due installation error of mini_racer 0.4.0
Update PhantomJS to latest for Ubuntu dev guide?
How to setup discourse in my local for development?
How might we better structure #howto?
Please help, how do I install Discourse on macOS?
How might we better structure #howto?
Can't reach Discourse server in VM from Host
Migrate a MyBB forum to Discourse
Installing Plugins in Discourse Development Install
Images are not being populated in discourse
How to install Discourse locally?
Discourse Local setup
Is this correct? How long to install dev Version?
Overriding user_guardian.rb in a plugin (no fork necessary!)
How Sam's Windows development environment is configured
Site setting is different Every time on Ubuntu development installation
Problems with understanding the development of Discourse
How do I change the address in the database?
Discourse on local pc
Error while importing topics from Flarum (users, groups import OK)
Issue with vagrant version following the dev guide
Flarum To Discourse Migration
Problem in development Installation
Install Discourse on macOS for development
Calling out for Testers
Problem in development Installation
Developing on the mobile version of Discourse
Can't build Discourse on Ubuntu 20.10
Errno::EACCES: Permission denied on new Ubuntu development setup
Discourse standalone
Set up a local Discourse Development Environment?
Discourse as Your First Rails App
Unable to setup discourse
Migrate a phpBB3 forum to Discourse
Migrate a vBulletin 4 forum to Discourse
Migrate a FluxBB forum to Discourse
Migrate a NodeBB forum with Redis to Discourse
Migrate a MyBB forum to Discourse
Migrate a NodeBB forum with MongoDB to Discourse
Migrate a Ning forum to Discourse
Migrate a Phorum forum to Discourse
Migrate a PunBB forum to Discourse
Migrate from another forum to Discourse
Migrate a Kunena 3 forum to Discourse
Migrate a bbPress WordPress plugin forum to Discourse
Unable to setup discourse
Use the Discourse API ruby gem
Use Screen To Bootstrap A Development Install (Ubuntu)
Set up Discourse for development on Fedora Linux
RSpec search_spec.rb RateLimiter LimitExceeded problems
Need to restart Ember in order to test front-end changes
Uploads location on dev instance?
Nodebb to Discourse
Error installing `bullseye-backports` when trying to install for Development
Migrate a MyBB forum to Discourse
Local installation internal use only
ImageMagick Install Fails during Dev Installation on Ubuntu 22.04.1
ImageMagick Install Fails during Dev Installation on Ubuntu 22.04.1
Discourse dev install script may need upgrade
How to reset discourse on dev mode? (w/o docker)
I'm having trouble installing a local Discourse instance on Windows 11
Login popup not display
Not able to restore discourse docker backup on Ubuntu discourse installation
Migrate a bbPress WordPress plugin forum to Discourse
I want to build a debug version of discourse
Database wont migrate Discourse
How to customize the Discourse app using docker container?
Installing Discourse on windows using Docker Desktop
End-to-end system testing for themes and theme components
CSRF problem in development with 'Discourse OpenID Connect' plug-in
What is the latest recommended workflow for local development? (Ubuntu 16.04)
What is the latest recommended workflow for local development? (Ubuntu 16.04)
Need help integrating code wrote on Edittext to the Discourse
Integration into custom auth system where emails are not unique?
How can I make my own Discourse plugins?
Overriding user_guardian.rb in a plugin (no fork necessary!)
Does Gemfile need to include svg?
Does Gemfile need to include svg?
Docker in VMWare - How to access to Discourse
Discourse Server logs show DB queries when I run the server
Contributing to Discourse development
Development install fails when running bin/rails db:migrate
[PAID] Import from Legacy Postgres DB
Developing Discourse on GitHub Codespaces
Attachment filename not set on download
Install Discourse on Windows for development
How to get a docker image of discourse using bash on windows 10?
Installing problem - bundle install
Unable to create Vagrant local installation
Connecting WP Discourse to a local Discourse Instance running a specific version
Chat not working after dev install
How to create new user with verified email in development mode?
Discourse Ember CLI Proxy Error
Bundling more popular plugins with Discourse core
How to install Discourse on windows
Importing MyBB database to Discourse
Can't find the Discourse folder inside virtual box via ssh
Dev environment: recommended way to bootstrap the first admin account without email?
Discourse running very slow on local machine
Migrate from GetSatisfaction to Discourse
Share your Discourse dev setup
Developing Discourse Plugins - Part 6 - Add acceptance tests
How to install Discourse on windows
Install Discourse for development using Docker
Can't uninstall on Ubuntu 18.04
Install and import Mysql on the development environment
Connecting to Droplet
Connecting to Droplet
State of disqus to discourse importer
How to install the bootsnap gem?
Where is the db connection information discourse?
Rake aborted message is showing when installing vagrant development
Any interest in Podman?
Formal german available?
Trouble getting a top level page to Ember
Install discourse on localhost
Ubuntu development install: Permission denied @ apply2files
How to fix bundler executable conflicts in the `techAPJ/install-rails` script?
Which is the better option to self-host?
NULL first_visited_at dates in the topic_users table
Multiple instances. Visiting the second instance signs out the logged in account on the running instance
Can't run my Discourse locally
I want to install a plugin for development, what should I do?
A check for updates has not been performed lately. Ensure sidekiq is running
Vbulletin 4 import -
Hello from Gitpod! (installing on google cloud + automated dev setup)