Skip to content

Instantly share code, notes, and snippets.

@mleszcz
Created June 14, 2018 12:38
Show Gist options
  • Select an option

  • Save mleszcz/7d1a7f14c48b8f972638a8c0ece0c226 to your computer and use it in GitHub Desktop.

Select an option

Save mleszcz/7d1a7f14c48b8f972638a8c0ece0c226 to your computer and use it in GitHub Desktop.

Revisions

  1. mleszcz created this gist Jun 14, 2018.
    28 changes: 28 additions & 0 deletions .docker-compose.yml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,28 @@
    version: '3'
    services:
    db:
    image: postgres
    volumes:
    - postgres-data:/var/lib/postgresql/data
    app: &app
    build: .
    image: some-app
    command: bundle exec rails s -p 3000 -b '0.0.0.0'
    volumes:
    - .:/workdir
    - app-gems:/gems
    ports:
    - "3000:3000"
    depends_on:
    - db
    environment:
    RAILS_ENV: development
    test:
    <<: *app
    image: some-app:test
    command: bundle exec rake
    environment:
    RAILS_ENV: test
    volumes:
    postgres-data:
    app-gems: