version: '2' services: web: environment: - TWITCH_CLIENT_ID - TWITCH_CLIENT_SECRET build: context: . dockerfile: Dockerfile command: bash -c "rm -f /app/tmp/pids/server.pid && bundle exec rails db:migrate && bundle exec rails s -p 3000 -b '0.0.0.0'" volumes: - .:/app ports: - 3000:3000 depends_on: - db - s3 - webpacker - worker links: - s3:s3.localhost - webpacker:webpacker.localhost db: image: postgres volumes: - ./db/init.sql:/docker-entrypoint-initdb.d/10-init.sql s3: image: lphoward/fake-s3 ports: - 4569:4569 expose: - "4569" webpacker: build: . command: bash -c "yarn install && ruby bin/webpack-dev-server" volumes: - .:/app ports: - 3035:3035 expose: - "3035" worker: environment: - TWITCH_CLIENT_ID - TWITCH_CLIENT_SECRET build: . command: bash -c "rm -f /app/tmp/pids/delayed*.pid && bundle exec rake jobs:work" ports: [] depends_on: - db - s3 links: - s3:s3.localhost redis: image: redis