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

Tobias notifications at github.com
Mon Dec 28 19:05:27 UTC 2020


First of all: Thanks a lot for this. This was the easiest setup I did, yet :-).

Here are a few things that happened:

### db:migrate

I get this response. Is this something important or can it be ignored?

```
$ docker-compose run --rm web bundle exec rails db:migrate
Creating openstreetmap-website_web_run ... done
pngcrush worker: `pngcrush` not found; please provide proper binary or disable this worker (--no-pngcrush argument or `:pngcrush => false` through options)
advpng worker: `advpng` not found; please provide proper binary or disable this worker (--no-advpng argument or `:advpng => false` through options)
optipng worker: `optipng` not found; please provide proper binary or disable this worker (--no-optipng argument or `:optipng => false` through options)
pngquant worker: `pngquant` not found; please provide proper binary or disable this worker (--no-pngquant argument or `:pngquant => false` through options)
jhead worker: `jhead` not found, `jpegtran` not found; please provide proper binary or disable this worker (--no-jhead argument or `:jhead => false` through options)
jpegoptim worker: `jpegoptim` not found; please provide proper binary or disable this worker (--no-jpegoptim argument or `:jpegoptim => false` through options)
jpegtran worker: `jpegtran` not found; please provide proper binary or disable this worker (--no-jpegtran argument or `:jpegtran => false` through options)
gifsicle worker: `gifsicle` not found; please provide proper binary or disable this worker (--no-gifsicle argument or `:gifsicle => false` through options)
svgo worker: `svgo` not found; please provide proper binary or disable this worker (--no-svgo argument or `:svgo => false` through options)
```

The migrations did run.

### rake test:db

Something is wrong:

```
$ docker-compose run --rm web bundle exec rake test:db

Creating openstreetmap-website_web_run ... done

rake aborted!
ActiveRecord::StatementInvalid: PG::InsufficientPrivilege: ERROR:  permission denied to create database
/usr/local/bundle/gems/activerecord-6.0.3.4/lib/active_record/connection_adapters/postgresql/database_statements.rb:92:in `exec'
…
Tasks: TOP => db:test:load => db:test:purge
```

### osmosis

This is still running – maybe. Or it got stuck. Will update with results later …

```
docker-compose run --rm web osmosis \
                                                                   -verbose    \
                                                                   --read-pbf berlin-latest.osm.pbf \
                                                                   --write-apidb \
                                                                       host="db" \
                                                                       database="openstreetmap" \
                                                                       user="openstreetmap" \
                                                                       validateSchemaVersion="no"
```

### Suggestions/Questions

- Should we document in more detail how to create a local user? Thinks like inspecting log to find the activation URL and cleaning this up to use it …
- Should we document in more detail how to "look into the docker DB with a local db client"? / How does this work?
- Should we suggest to setup a local domain? And use this for links in emails for example (the emails dont use the localhost that I use to open the page)?

### My current state

- I can load the website locally
- I can create a user
- I cannot edit via iD (alert: "iD was not configured"), but that is not a priority for me
- I cannot run tests yet (with test:db)

-- 
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#issuecomment-751831167
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20201228/3d9ee4eb/attachment-0001.htm>


More information about the rails-dev mailing list