Skip to content

Added support for local development using docker and docker compose.#1

Open
johnennewdeeson wants to merge 1 commit intojames:masterfrom
johnennewdeeson:master
Open

Added support for local development using docker and docker compose.#1
johnennewdeeson wants to merge 1 commit intojames:masterfrom
johnennewdeeson:master

Conversation

@johnennewdeeson
Copy link
Copy Markdown

Hi, wanted to try this project after reading your Medium post from a while back. Here's some configuration for local development using Docker if you're interested!

Comment thread docker-compose.yml
image: mdillon/postgis
web:
build: .
command: bundle exec rails s -p 3000 -b '0.0.0.0'
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found replacing this with
command: bash -c "rm -f tmp/pids/server.pid && bundle exec rails s -p 3000 -b '0.0.0.0'"
got around an issue I found where rails refused to boot if it found a server.pid file:

web_1  | A server is already running. Check /myapp/tmp/pids/server.pid.
web_1  | Exiting

Comment thread docker-compose.yml
version: '2'
services:
db:
image: mdillon/postgis
Copy link
Copy Markdown

@joshbalfour joshbalfour Jul 24, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adding

    volumes:
      - ./tmp/db:/var/lib/postgresql/data

here would make the database survive a reboot

@joshbalfour
Copy link
Copy Markdown

THANK YOU SO MUCH FOR THIS as a non-ruby dev I was able to get it set up in time for
the prototype discussion event at http://nwspk.house https://www.facebook.com/events/1358492740936113/ 😃

@johnennewdeeson
Copy link
Copy Markdown
Author

Glad its been useful!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants