Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- version: '2'
- services:
- db:
- image: postgres:latest
- ports:
- - '5432:5432'
- environment:
- - POSTGRES_PASSWORD=api
- - POSTGRES_USER=api
- volumes:
- - ./init.sql:/docker-entrypoint-initdb.d/init.sql
- redis:
- image: redis
- ports:
- - '6379:6379'
- worker:
- build: .
- volumes:
- - .:/api
- links:
- - db
- - redis
- command: sidekiq -r ./app.rb
- environment:
- - REDIS_PUBLISH_URL=redis://redis:6379/
- - DATABASE_URL=postgres://api:api@db:5432/my_api_development
- - TEST_DATABASE_URL=postgres://api:api@db:5432/my_api_test
- - RACK_ENV=test
- volumes:
- - .:/api
- web:
- build: .
- links:
- - db:db
- - redis:redis
- command: rackup -s Puma
- environment:
- - REDIS_PUBLISH_URL=redis://redis:6379/
- - DATABASE_URL=postgres://api:api@db:5432/my_api_development
- - TEST_DATABASE_URL=postgres://api:api@db:5432/my_api_test
- - RACK_ENV=test
- volumes:
- - .:/api
- ports:
- - "9292:9292"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement