Skip to content

Commit

Permalink
Add dev docs & optimize docker dev setup (#85)
Browse files Browse the repository at this point in the history
* add reusable cache store from image

on image boot the gem_cache will be filled with the installed gems from docker

* add getting started dev instructions

* add namesake for tove back onto readme

* fix formatting

* Update README.md

Co-Authored-By: Zach Wolfenbarger <[email protected]>

Co-authored-by: nciemniak <[email protected]>
Co-authored-by: Zach Wolfenbarger <[email protected]>
  • Loading branch information
3 people authored Jan 21, 2020
1 parent 1a631e4 commit 80245af
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 5 deletions.
30 changes: 27 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,32 @@
# TOVE: Transcription Object Viewer/Editor

*Readme and docs coming soon*
*Readme and docs coming soon*

>“You seem very clever at explaining words, Sir,” said Alice. “Would you kindly tell me the meaning of the poem ‘Jabberwocky’?”
Prepare the Docker containers:

```
docker-compose build
docker-compose run --rm app bundle exec rails db:setup
docker-compose run --rm -e RAILS_ENV=test app bin/rails db:create
```

Run tests with:

```
docker-compose run --rm -e RAILS_ENV=test app bundle exec rspec
```

Or interactively / manually in a docker shell

```
docker-compose run --rm -e RAILS_ENV=test app bash
# from the bash prompt
bin/rspec
```

## Namesake

>“You seem very clever at explaining words, Sir,” said Alice. “Would you kindly tell me the meaning of the poem ‘Jabberwocky’?”
>\
>\
>“Let’s hear it,” said Humpty Dumpty. “I can explain all the poems that ever were invented—and a good many that haven’t been invented just yet.”
Expand Down Expand Up @@ -37,4 +61,4 @@ And the mome raths outgrabe.
>\
“They are that,” said Humpty Dumpty: “also they make their nests under sun-dials—also they live on cheese.”

--Lewis Carrol, "Through the Looking Glass"
--Lewis Carrol, "Through the Looking Glass"
9 changes: 7 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
version: '2'
version: '3'
services:
postgres:
image: postgres:9.4
image: postgres:9.5
environment:
- "POSTGRES_USER=tove"
- "POSTGRES_PASSWORD=tove"

app:
build:
context: .
dockerfile: Dockerfile
args:
RAILS_ENV: development
volumes:
- ./:/app
- gem_cache:/usr/local/bundle
ports:
- "3000:80"
environment:
Expand All @@ -21,3 +23,6 @@ services:
- "DATABASE_URL_TEST=postgresql://tove:tove@postgres/tove_test"
links:
- postgres:postgres

volumes:
gem_cache:

0 comments on commit 80245af

Please sign in to comment.