[openstreetmap/openstreetmap-website] Add Docker Compose Support for Development Environment (#2409)

Jamie Alessio notifications at github.com
Mon Mar 2 03:27:13 UTC 2020


jalessio commented on this pull request.



> +- You can tail logs of a running container with a command like this: `docker-compose logs -f web` or `docker-compose logs -f db`.
+- Instead of running the containers in the background with the `-d` flag, you can launch the containers in the foreground with `docker-compose up`. The downside of this is that the logs of all the 'services' defined in `docker-compose.yml` will be intermingled. If you don't want this you can mix and match - for example, you can run the database in background with `docker-compose up -d db` and then run the Rails app in the foreground via `docker-compose up web`.
+
+### Migrations
+
+Run the Rails database migrations:
+
+    docker-compose run --rm web bundle exec rake db:migrate
+
+### Tests
+
+Run the test suite by running:
+
+    docker-compose run --rm web bundle exec rake test:db
+
+### Loading an OSM extract

Since loading an extract via osmosis stopped working after PR https://github.com/openstreetmap/openstreetmap-website/pull/2432 I'm inclined to remove this section until I can offer a working solution.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/2409#pullrequestreview-366933307
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20200301/fb7f45df/attachment.htm>


More information about the rails-dev mailing list