mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 02:19:27 +08:00
97e2a614c8
add symlink to simplify invoking docker commands `d/rake` |
||
---|---|---|
.. | ||
boot_dev | ||
bundle | ||
mailcatcher | ||
psql | ||
rails | ||
rake | ||
README.md | ||
reset_db | ||
shell | ||
shutdown_dev | ||
sidekiq |
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.