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

Andy Allan notifications at github.com
Thu Feb 4 10:58:58 UTC 2021


@gravitystorm commented on this pull request.



> @@ -0,0 +1,7 @@
+FROM postgres:11
+
+# Add db init script to install OSM-specific Postgres functions/extensions.
+ADD docker/postgres/openstreetmap-postgres-init.sh /docker-entrypoint-initdb.d/
+
+# Custom database functions are in a SQL file.
+ADD db/functions/functions.sql /usr/local/sbin/osm-db-functions.sql

To answer your second question, yes, you run those old migrations - the instructions have `docker-compose run --rm web bundle exec rake db:migrate`

But the wider topic is whether we should keep those old migrations, whether we see the database defined by either a) the sum of all the migrations or b) the structure.sql file (opinions vary), and finally whether if we do drop old migrations should we have a 'fake' starter migration, or should we just keep a certain number of migrations and change all the documentation to use rake db:structure:load (or similar), and finally (finally) if we don't keep all the migrations, how do we ensure that the structure file matches the sum of the migrations that have been run production. So that's not a simple set of decisions.

-- 
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#discussion_r570132177
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20210204/5e9f2b1b/attachment.htm>


More information about the rails-dev mailing list