macOS에서 개발용 Discourse 설치하기

:warning: 이 가이드는 macOS 개발 환경의 설치 방법을 다룹니다. 프로덕션 환경 설치 가이드는 다음을 참고하세요: Install Discourse in production with the official supported instructions

macOS에서 Discourse를 설정하여 개발과 해킹(수정/실험)을 해보고 싶으신가요?

여러분의 Mac에 Ruby/Rails/Postgres/Redis가 설치되어 있지 않다고 가정합니다. 시작해 보겠습니다 :rocket: !

Discourse 의존성 설치

시스템에 다음 패키지가 필요합니다:

** 선택 사항

터미널을 재시작하세요

이제 Discourse 의존성이 설치되었으므로, Discourse 자체를 설치하는 단계로 넘어가겠습니다.

터미널 재시작

셸을 종료하고 다시 시작하면 설치된 패키지의 경로가 터미널에 의해 올바르게 인식됩니다.

Discourse 클론

Discourse 저장소를 ~/discourse 폴더에 클론하세요:

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

~는 홈 폴더를 나타내므로, Discourse 소스 코드는 홈 폴더에서 사용할 수 있게 됩니다.

Discourse 부트스트랩

Discourse 폴더로 이동하세요:

cd ~/discourse

필요한 gems를 설치합니다

bundle install

JS 의존성을 설치합니다

pnpm install

다음으로, 로컬 Discourse 인스턴스를 설정하려면 다음 명령을 실행하세요:

bundle exec rake db:create
bundle exec rake db:migrate
RAILS_ENV=test bundle exec rake db:create db:migrate

Rails + Ember 서버를 시작합니다. 여기에는 두 가지 옵션이 있습니다.

옵션 1: 두 개의 별도 터미널 탭/창을 사용하여 Rails와 프론트엔드 번들러를 각각 실행합니다

bundle exec rails server

그리고

bin/dev --only ember

옵션 2: 터미널 탭/창 하나만 사용:

bin/dev # Pitchfork와 프론트엔드 번들러를 함께 실행

:tada: 이제 http://localhost:3000으로 이동하여 로컬 Discourse 설치를 볼 수 있어야 합니다. (서버 워밍업으로 인해 첫 번째 로딩에 최대 1분이 걸릴 수 있다는 점을 참고하세요.)

스펙(테스트)을 실행해 볼 수도 있습니다:

bundle exec rake autospec

모든(또는 거의 모든) 테스트가 통과해야 합니다.

새 관리자 생성

새 관리자를 생성하려면 다음 명령을 실행하세요:

RAILS_ENV=development bundle exec rake admin:create

프롬프트에 따라 관리자 계정을 생성하세요.

메일 구성

MailHog를 실행하세요:

mailhog

축하합니다! 이제 여러분은 자신의 Discourse 설치의 관리자가 되었습니다!

즐거운 개발 하세요! 그리고 시작하기 위해, Discourse 플러그인 생성 입문 가이드를 참고하세요.


이 문서는 버전 관리됩니다 - 변경 사항을 제안하려면 github에서 제안해 주세요.

78개의 좋아요
Setup discourse on Mac OS
Running Discourse on Docker for Mac
Localhost:3000/users gives no-results
How to install Discourse on windows
How to install Discourse locally?
Best dev installation method for running on macOS?
Help me setup my Discourse development environment
MacOS Installation Gem::FilePermissionError
Local installation internal use only
UndefinedTable: ERROR: relation "web_hook_event_types" when trying to run rspec test
Error after cleaning tmp folder
Starting discourse fails with bootstrap error
Discourse standalone
Migrate a NodeBB forum with Redis to Discourse
Please help, how do I install Discourse on macOS?
Migrate a phpBB3 forum to Discourse
Migrate a FluxBB forum to Discourse
Migrate a vBulletin 3 forum to Discourse via XenForo
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 from another forum to Discourse
Migrate a Kunena 3 forum to Discourse
Migrate a bbPress WordPress plugin forum to Discourse
Install Discourse for development using Docker
Use the Discourse API ruby gem
Enable CORS on localhost for DiscourseConnect
Regarding the installation - docker
Need help integrating code wrote on Edittext to the Discourse
Keyboard navigation messes up the search menu
WP-Discourse not connected and admin email not recognized
Contributing to Discourse development
How to install discussions on localhost in my mac?
How to install Discourse for Wordpress locally running on MAMP
Error when building: "Runtime Error: discourse does not support compiling scss/sass files via sprockets"
Migrate from GetSatisfaction to Discourse
Case study of an amateur plugin author
Upgrading Mathjax to version 4
Windows server publish method
Topic List Previews (TLP)
Discourse as Your First Rails App
Set Environmental Variables
Category option: max topics per user (2 use-case examples)
Can't deploy to heroku
[PAID] Import from Legacy Postgres DB
Vagrant based server failing on db:migrate
Change unicorn port from 3000 in development
I want to build a debug version of discourse
Moderation Tools
Rails server --daemon and plugins
Installing problem - bundle install
Nginx Performance Report plugin incompatible with development environment setup script
Rake aborted message is showing when installing vagrant development
Update PhantomJS to latest for Ubuntu dev guide?
Cannot Backup my Development Instance (Fails)
Install error : Protocol violation
Can't set up dev environment due to cppjieba_rb failing to install
How to edit the discourse files? A development box?
How to add a new language
How to relax Content Security Policy
Installing Discourse for macOS Development Using asdf and docker-compose
Override profile background via SSO
Can't set up dev environment due to cppjieba_rb failing to install
Stuck in infinite loop in Mac terminal after source ~/.bashrc
Install on macOS – Failure: Scheduler::Defer can pause and resume
Disabling SSO in development environment
Local development and deploying from same repo
Discourse Connect on Local instance is not working
Can't start localhost server -- file was built for x86_64 which is not the architecture being linked (i386)
Please help, how do I install Discourse on macOS?
How to connect to an external database running on localhost
How can I include discourse in my local dev stack?
Global messages on 94632 timed out, restarting process, 95535 successfully terminated by `TERM` signal
Cannot get embedding to work
/admin/config/emoji non responsive/locks up
App.yml file does not exist when installing Discourse locally
Ember-cli error on local MacOS development
Importing / migrating from Zendesk Community to Discourse
Redis version error when I run bundle exec db:create
Dev environment setup failed on bundle install
Set up a local Discourse Development Environment?
[Need help][MacOS M1 dev installation] ArgumentError unknown keywords
Migrate a PunBB forum to Discourse