Commit Graph

99 Commits

Author SHA1 Message Date
Sam Saffron 3b77fb1fb1 DEV: support symlinked plugins in bin/rake autospec
Previously autospec would not pick up save if you saved a plugin in a
symlinked path, this broke quite a few workflows

We now maintain a reverse map so we can correctly re-run specs in plugins
2019-05-03 13:51:07 +10:00
Sam 0e6d0b0f8e FEATURE: always update docker image for dev prior to launching
Previously people could stay stuck on old dev images, this ensures they
are always on latest when booting
2019-02-18 13:12:00 +11:00
Sam 384135845b FEATURE: introduce ultra_low priority queue
This commit introduces an ultra low priority queue for post rebakes. This
way rebakes can never interfere with regular sidekiq processing for cases
where we perform a large scale rebake.

Additionally it allows Post.rebake_old to be run with rate_limiter: false
to avoid triggering the limiter when rebaking. This is handy for cases
where you want to just force the full rebake and not wait for it to trickle
2019-01-17 14:53:19 +11:00
Sam 77d947701c DEV: Add missing discourse script to docker dev 2019-01-07 13:10:37 +11:00
Sam fef45789c4 DEV: improve docker dev environment
- pass USER=discourse which is not passed in from docker exec (improves backup restore)

- add unicorn script and unicorn support (expose port 9292)
2018-12-31 10:45:08 +11:00
Sam 6cf2e64e44 DEV: always run migrations for plugins in dev
Otherwise devs forget to run plugin migrations and get confused when test
does not work. We ship critical migrations in the bundled polls plugin.
2018-12-06 17:19:46 +11:00
Rishabh 10723ba1c2
Remove Docker dev-install instructions
To have a single source of truth for these install instructions in here:
https://meta.discourse.org/t/beginners-guide-to-install-discourse-for-development-using-docker/102009
2018-11-16 15:17:21 +05:30
Sam f9f490e957 DEV: bin/unicorn -x to run without sidekiq 2018-08-17 10:01:44 +10:00
Sam b8667c77c4 DEV: adjust bin/unicorn to support -p properly 2018-08-15 10:35:24 +10:00
Sam c8d369a659 DEV: support -p in `rails s`
if you need to specify port
2018-08-15 10:25:00 +10:00
Sam b504398a91 DEV: keep `bin/unicorn` clean from log noise 2018-08-14 08:49:57 +10:00
Robin Ward cc90ed3870 Don't look for the only argument, but the first one 2018-08-09 10:14:45 -04:00
Guo Xiang Tan 56d3e07206 Use string when setting env value. 2018-08-07 16:38:31 +08:00
Guo Xiang Tan 81c6849194 Default `rails server` port should be 3000. 2018-08-07 16:33:04 +08:00
Sam 84c4dfd22d correct issues 2018-08-07 18:29:41 +10:00
Guo Xiang Tan 9e63ebdf0f DEV: Allow `UNICORN_PORT` env to be set. 2018-08-07 16:20:08 +08:00
Sam f3549291a3 DEV: use unicorn in development
This commit also cleans up a bunch of pointless noise each time we boot app

- narrative was loading i18n cause redefinition of consts
- discourse.rb was loaded twice as was auth
- bin/unicorn now does all the smart things and boots unicron in dev
- bin/rails s will boot unicorn with no params
- remove bin/puma which only causes confusion
2018-08-07 17:13:47 +10:00
mmayoNR a900c9bf93 pass env vars into local dev image (#6212) 2018-08-01 16:44:27 +10:00
Kyle Zhao 3e7638e3f5 Improve docker performance with `delegated` mount flag (#5760) 2018-04-16 10:56:35 +02:00
Jay Pfaffman 2658ef5e0b FIX: reset_db (#5617)
To get the database rebuilt requires a restart of the container. 

I also added a rake admin:create, since it's useful, and it's what `boot_dev --init `does.
2018-03-05 17:30:08 -05:00
Sam 32d881399f avoid getting duplicates in docker dev paths 2017-12-15 10:11:40 +11:00
Sam e0f660d9a9 lets crash out on error 2017-12-14 18:03:17 +11:00
Guo Xiang Tan 77d4c4d8dc Fix all the errors to get our tests green on Rails 5.1. 2017-09-25 13:48:58 +08:00
Guo Xiang Tan 5012d46cbd Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
Sam 234694b50f Feature: CommonMark support
This adds the markdown.it engine to Discourse.
https://github.com/markdown-it/markdown-it

As the migration is going to take a while the new engine is default
disabled. To enable it you must change the hidden site setting:
enable_experimental_markdown_it.

This commit is a squash of many other commits, it also includes some
improvements to autospec (ability to run plugins), and a dev dependency
on the og gem for html normalization.
2017-06-23 12:01:33 -04:00
Sam 4c1b0e64d7 Merge pull request #4874 from davidtaylorhq/docker_dev_rake
Use `bundle exec` for docker_dev rake
2017-05-24 11:51:13 -04:00
Sam e7c2ad41ca Move discourse dev data out of tmp
Fix watch for restart so it works with puma
2017-05-18 11:36:24 -04:00
David Taylor 058cde1fc5 Use `bundle exec` for docker_dev rake 2017-05-16 17:18:45 +01:00
Rafael dos Santos Silva 2e152f4d39 FIX: Use latest docker image for dev 2017-05-16 12:05:11 -03:00
Sam 7e15077bec add puma binstub 2017-05-15 09:08:51 -04:00
Sam Saffron 9051ca7959 correct sample to work with rails.vim 2017-04-25 09:51:49 -07:00
Sam Saffron f04fbf911a FEATURE: in vim dev you can focus on spec line in autospec
instructions in bin/notify_file_change
2017-04-25 09:13:29 -07:00
Sam 3906f55132 add binstub for rspec 2017-04-17 12:58:34 -04:00
ckeboss 6bfe92e19e Update boot_dev 2017-04-12 10:33:56 -07:00
ckeboss 513f1f065a Wrap directory names in quotes
When there are spaces in any of the directories referenced, bash will error out. This wraps those items in quotes to allow bash to parse the path names properly.
2017-04-12 09:41:23 -07:00
Leo McArdle a11c4a8078 FIX: start sidekiq process for all queues in docker dev
https://meta.discourse.org/t/docker-dev-only-starting-critical-sidekiq-queue/58242
2017-03-02 18:00:24 +00:00
Sawood Alam 911629735c
Removed the fallback mailcatcher install command 2016-12-13 09:26:11 -05:00
Sam b650a45b37 tweak perf of rake and rails 2016-12-13 14:51:07 +11:00
Sam 4faec8af96 add some extra helper scripts 2016-12-13 09:24:31 +11:00
Sam 97e2a614c8 add wrappers for mailcatcher and sidekiq
add symlink to simplify invoking docker commands `d/rake`
2016-12-13 09:05:45 +11:00
Sam 107a21c069 update readme for docker dev 2016-12-12 18:00:25 +11:00
Sam 4b0f013edf migrate test as well 2016-12-12 17:47:24 +11:00
Sam 1cbb8dc9b7 improve dev process 2016-12-12 17:39:20 +11:00
Jared Reisinger b7ea3de7bb Switch from hard-coded image version to 'latest' 2016-09-22 12:58:43 -07:00
Jared Reisinger 4db3f53c87 Improve the "develop inside Docker" experience
This PR is intended to work in concert with the discourse_docker changes
in https://github.com/discourse/discourse_docker/pull/292.  I have used
those changes to build a local "discourse_dev" image, and then
_**these**_ changes to easily spin up and work on Discourse and plugin
functionality.  It's working well for me, but of course YMMV.

Add `--init` and `--patch` options to bin/docker/boot_dev to make it
easier to spin up a container running Discourse out of a development
directory.

Add `bin/docker/README.md` to explain how to go about using the docker
command-line tools.

Tweak the Docker command-line tools to use the `-u` option to specify
user rather than changing to the user "inside" the container via `chpst`
(This way, we don't have to explicitly specify the HOME environment
variable, either.)

Add `bin/docker/shell` command to make it easy to jump inside the
running container.
2016-09-20 15:35:50 -07:00
Sam 2c4f290786 docker dev binaries 2015-11-02 13:33:08 +11:00
Sam Saffron b2c30d0e34 Revert "travis likes old bundler"
This reverts commit 1adda31cbc.
2015-04-16 16:15:04 +10:00
Sam Saffron 1adda31cbc travis likes old bundler 2015-04-16 16:13:48 +10:00
David Celis 49bc7692bf Include binstubs generated by Rails 4
Commit b516ecc added `bin/` to the .gitignore file. Now that Discourse
runs using Rails 4 by default, however, we should include the binstubs
generated by `rake rails:update:bin` in version control as this is the
recommendation of the Rails core team. Additionally, for those wishing
to deploy Discourse to Heroku, these binstubs are actually mandatory
according to [this article](https://devcenter.heroku.com/articles/rails4).

Other binstubs can continue to be ignored.

Signed-off-by: David Celis <me@davidcel.is>
2014-02-06 11:15:00 -08:00