From 3f4db4fe314a9875920d0e4e7fd14538a9ed4fdd Mon Sep 17 00:00:00 2001 From: Ira Date: Sat, 13 May 2017 18:11:55 +0300 Subject: [PATCH 1/5] Packages that were needed in my dev env Packages that were needed in my dev env --- Running-Mastodon/Development-guide.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Running-Mastodon/Development-guide.md b/Running-Mastodon/Development-guide.md index 4b2431e5..a3337697 100644 --- a/Running-Mastodon/Development-guide.md +++ b/Running-Mastodon/Development-guide.md @@ -11,6 +11,10 @@ In fact, all you need is described in the [production guide](Production-guide.md - To prefix any commands with `RAILS_ENV=production` since the default environment is "development" anyway - Any cronjobs +Ubuntu dependencies for a development environment (bundler will fail if these are not installed in advance) + + sudo apt-get install libpq-dev libssl-dev libprotobuf-dev protobuf-compiler ; sudo gem update --no-ri --no-rdoc + The command to install Ruby project dependencies is the following: bundle install --with development From acf56f2266d2ff504b4c4bbd49227a0639218ec9 Mon Sep 17 00:00:00 2001 From: Ira Abramov Date: Sat, 13 May 2017 18:48:49 +0300 Subject: [PATCH 2/5] Webpacker addition after v1.3.3 requires a documentation as well. --- Running-Mastodon/Development-guide.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Running-Mastodon/Development-guide.md b/Running-Mastodon/Development-guide.md index a3337697..4f983b5c 100644 --- a/Running-Mastodon/Development-guide.md +++ b/Running-Mastodon/Development-guide.md @@ -31,8 +31,14 @@ To setup the `mastodon_development` database, run: You can then run Mastodon with: + ./bin/webpack-dev-server & # New after 1.3.3 bundle exec rails server +Another approach to manage the different servers starting (redis, rails, webpacker, Sidekiq, streaming): + + gem install foreman --no-ri --no-rdoc + foreman start + And open `http://localhost:3000` in your browser. Background jobs run inline (aka synchronously) in the development environment, so you don't need to run a Sidekiq process. By default, your development environment will have an admin account created for you to use - the email address will be `admin@YOURDOMAIN` (e.g. admin@localhost:3000) and the password will be `mastodonadmin`. From c29f6f2ee63ee46f9d2c06b4512f0a906006dc12 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Mon, 22 May 2017 04:19:33 +0200 Subject: [PATCH 3/5] Update Development-guide.md --- Running-Mastodon/Development-guide.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Running-Mastodon/Development-guide.md b/Running-Mastodon/Development-guide.md index 4f983b5c..ca309088 100644 --- a/Running-Mastodon/Development-guide.md +++ b/Running-Mastodon/Development-guide.md @@ -31,15 +31,18 @@ To setup the `mastodon_development` database, run: You can then run Mastodon with: - ./bin/webpack-dev-server & # New after 1.3.3 bundle exec rails server -Another approach to manage the different servers starting (redis, rails, webpacker, Sidekiq, streaming): +Since 1.4, we are using Webpack, which in development environment needs to be started as well as the command above: - gem install foreman --no-ri --no-rdoc + ./bin/webpack-dev-server + +Another, optional approach to managing the different processes starting (Rails, Webpack, Sidekiq, and the Streaming API) is to use the foreman tool. + + gem install foreman foreman start -And open `http://localhost:3000` in your browser. Background jobs run inline (aka synchronously) in the development environment, so you don't need to run a Sidekiq process. +Finally, open `http://localhost:3000` in your browser. By default, your development environment will have an admin account created for you to use - the email address will be `admin@YOURDOMAIN` (e.g. admin@localhost:3000) and the password will be `mastodonadmin`. From 9a8919020282e71b9e284306fe501e80d2916b42 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Mon, 22 May 2017 04:20:26 +0200 Subject: [PATCH 4/5] Update Development-guide.md --- Running-Mastodon/Development-guide.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Running-Mastodon/Development-guide.md b/Running-Mastodon/Development-guide.md index ca309088..22159dfb 100644 --- a/Running-Mastodon/Development-guide.md +++ b/Running-Mastodon/Development-guide.md @@ -13,11 +13,11 @@ In fact, all you need is described in the [production guide](Production-guide.md Ubuntu dependencies for a development environment (bundler will fail if these are not installed in advance) - sudo apt-get install libpq-dev libssl-dev libprotobuf-dev protobuf-compiler ; sudo gem update --no-ri --no-rdoc + sudo apt-get install libpq-dev libssl-dev libprotobuf-dev protobuf-compiler The command to install Ruby project dependencies is the following: - bundle install --with development + bundle install Similarly, installing JavaScript dependencies doesn't require any flags: From f4e6c29a534ea5275a6a9f498a1edebfd028c787 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Mon, 22 May 2017 04:21:32 +0200 Subject: [PATCH 5/5] Update Development-guide.md --- Running-Mastodon/Development-guide.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Running-Mastodon/Development-guide.md b/Running-Mastodon/Development-guide.md index 22159dfb..b91b4a67 100644 --- a/Running-Mastodon/Development-guide.md +++ b/Running-Mastodon/Development-guide.md @@ -6,15 +6,11 @@ Development guide In fact, all you need is described in the [production guide](Production-guide.md), **with the following exceptions**. You **don't** need: - Nginx -- SystemD +- Systemd - An `.env.production` file. If you need to set any environment variables, you can use an `.env` file - To prefix any commands with `RAILS_ENV=production` since the default environment is "development" anyway - Any cronjobs -Ubuntu dependencies for a development environment (bundler will fail if these are not installed in advance) - - sudo apt-get install libpq-dev libssl-dev libprotobuf-dev protobuf-compiler - The command to install Ruby project dependencies is the following: bundle install