Skip to content

Commit

Permalink
Adds README for docker
Browse files Browse the repository at this point in the history
- adds secrets environment for development docker
- adds docker db config as basis
  • Loading branch information
sbpipb committed Oct 22, 2019
1 parent 6a8decd commit a9a3786
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,19 @@ If you are new to Rails, follow the [RailsBridge Installfest instructions](http:
Client Secret from your Github application
* Don't forget to restart your Rails server so it can see your shiny new GitHub key & secret

#### Docker setup

1. Install docker and docker compose

1. build
docker-compose build

1. build
docker-compose run --rm app bash -c bundle

1. setup DB
docker-compose run --rm app bundle exec rake db:setup

### Tests

Tests, also known as specs, are great! Adding tests is a great pull request all on its own. Please try to write tests when you add or change functionality.
Expand Down
19 changes: 19 additions & 0 deletions config/database.docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
development:
adapter: postgresql
host: db
encoding: unicode
database: doubleunion_development
pool: 5
username: postgres
password: password
template: template0

test: &test
adapter: postgresql
host: db
encoding: unicode
database: doubleunion_test
pool: 5
username: postgres
password: password
template: template0
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ services:
- PSQL_USERNAME=postgres
- PSQL_PASSWORD=password
- PSQL_HOST=db
- SECRET_TOKEN=development
tty: true
stdin_open: true

Expand Down

0 comments on commit a9a3786

Please sign in to comment.