Skip to content

Commit

Permalink
Move db config to yml file
Browse files Browse the repository at this point in the history
  • Loading branch information
jalessio committed Oct 22, 2019
1 parent 2b58a0d commit c528202
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
2 changes: 1 addition & 1 deletion DOCKER.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Now change working directory to the `openstreetmap-website`:

### Database

cp config/example.database.yml config/database.yml
cp config/docker.database.yml config/database.yml

### App configuration

Expand Down
20 changes: 20 additions & 0 deletions config/docker.database.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# This configuration is tailored for use with docker-compose. See DOCKER.md for more information.

development:
adapter: postgresql
database: openstreetmap
username: openstreetmap
password: openstreetmap
host: db
encoding: utf8

# Warning: The database defined as 'test' will be erased and
# re-generated from your development database when you run 'rake'.
# Do not set this db to the same as development or production.
test:
adapter: postgresql
database: osm_test
username: postgres
password:
host: db
encoding: utf8
3 changes: 0 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ services:
command: bundle exec rails s -p 3000 -b '0.0.0.0'
depends_on:
- db
environment:
# DATABASE_URL: postgresql://postgres@db/openstreetmap
DATABASE_URL: postgresql://openstreetmap:openstreetmap@db/openstreetmap

db:
build:
Expand Down

0 comments on commit c528202

Please sign in to comment.