Advertisement
Guest User

Untitled

a guest
Feb 20th, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. version: '2'
  2. services:
  3. db:
  4. image: postgres:latest
  5. ports:
  6. - '5432:5432'
  7. environment:
  8. - POSTGRES_PASSWORD=api
  9. - POSTGRES_USER=api
  10. volumes:
  11. - ./init.sql:/docker-entrypoint-initdb.d/init.sql
  12.  
  13. redis:
  14. image: redis
  15. ports:
  16. - '6379:6379'
  17.  
  18. worker:
  19. build: .
  20. volumes:
  21. - .:/api
  22. links:
  23. - db
  24. - redis
  25. command: sidekiq -r ./app.rb
  26. environment:
  27. - REDIS_PUBLISH_URL=redis://redis:6379/
  28. - DATABASE_URL=postgres://api:api@db:5432/my_api_development
  29. - TEST_DATABASE_URL=postgres://api:api@db:5432/my_api_test
  30. - RACK_ENV=test
  31. volumes:
  32. - .:/api
  33.  
  34. web:
  35. build: .
  36. links:
  37. - db:db
  38. - redis:redis
  39. command: rackup -s Puma
  40. environment:
  41. - REDIS_PUBLISH_URL=redis://redis:6379/
  42. - DATABASE_URL=postgres://api:api@db:5432/my_api_development
  43. - TEST_DATABASE_URL=postgres://api:api@db:5432/my_api_test
  44. - RACK_ENV=test
  45. volumes:
  46. - .:/api
  47. ports:
  48. - "9292:9292"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement