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

Andy Allan notifications at github.com
Wed Oct 23 15:15:10 UTC 2019

gravitystorm commented on this pull request.

> +
+Now change working directory to the `openstreetmap-website`:
+    cd openstreetmap-website
+### Storage setup
+    cp config/example.storage.yml config/storage.yml
+### Database
+    cp config/docker.database.yml config/database.yml
+### App configuration
+    cp config/settings.yml config/settings.local.yml

No, please don't do this. The settings.local.yml file should only contain values that you want to override.

See https://github.com/openstreetmap/openstreetmap-website/blob/edd49e85823079d6de19cbc9f89c6abc0568382b/INSTALL.md#prepare-local-settings-file

> +    docker-compose build
+Now if this is your first time running or you have removed cache this will take some time to complete. So grab tea/coffee and sit tight. Once the Docker images have finished building you can launch the images as containers.
+To launch the app run:
+    docker-compose up -d
+This will launch one Docker container for each 'service' specified in `docker-compose.yml` and run them in the background. There are two options for inspecting the logs of these running containers:
+- 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
+While the `db' service is running, open another terminal windows and run:

* mismatched quotes, should be `db`.
* terminal window should be singular

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20191023/d120ae69/attachment-0001.html>

More information about the rails-dev mailing list