discourse/bin/docker
mmayoNR a900c9bf93 pass env vars into local dev image (#6212) 2018-08-01 16:44:27 +10:00
..
README.md Fix all the errors to get our tests green on Rails 5.1. 2017-09-25 13:48:58 +08:00
boot_dev pass env vars into local dev image (#6212) 2018-08-01 16:44:27 +10:00
bundle Improve the "develop inside Docker" experience 2016-09-20 15:35:50 -07:00
mailcatcher Removed the fallback mailcatcher install command 2016-12-13 09:26:11 -05:00
migrate add some extra helper scripts 2016-12-13 09:24:31 +11:00
psql Improve the "develop inside Docker" experience 2016-09-20 15:35:50 -07:00
rails tweak perf of rake and rails 2016-12-13 14:51:07 +11:00
rake Use `bundle exec` for docker_dev rake 2017-05-16 17:18:45 +01:00
reset_db FIX: reset_db (#5617) 2018-03-05 17:30:08 -05:00
shell Improve the "develop inside Docker" experience 2016-09-20 15:35:50 -07:00
shell_root add some extra helper scripts 2016-12-13 09:24:31 +11:00
shutdown_dev Improve docker performance with `delegated` mount flag (#5760) 2018-04-16 10:56:35 +02:00
sidekiq FIX: start sidekiq process for all queues in docker dev 2017-03-02 18:00:24 +00:00

README.md

Developing using Docker

Since Discourse runs in Docker, why not develop there? If you have Docker installed, you should be able to run Discourse directly from your source directory using a Discourse development container.

Step-by-step

It should be as easy as (from your source root):

./bin/docker/boot_dev --init
    # wait while:
    #   - dependencies are installed,
    #   - the database is migrated, and
    #   - an admin user is created (you'll need to interact with this)

./bin/docker/rails s

... then open a browser on http://localhost:3000 and voila!, you should see Discourse.

When you're done, you can kill the Docker container with:

./bin/docker/shutdown_dev

Note that data is persisted between invocations of the container in your source root tmp/postgres directory.

If for any reason you want to reset your database run

sudo rm -fr tmp/postgres

Other Notes

Where is the container image/Dockerfile defined?

The Dockerfile comes from discourse/discourse_docker on GitHub, in particular image/discourse_dev.