Advertisement
Guest User

Untitled

a guest
Jun 30th, 2018
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.72 KB | None | 0 0
  1. version: '3'
  2.  
  3. services:
  4. app:
  5. environment:
  6. - APP_SETTINGS=config.DevelopmentConfig
  7. - FLASK_APP=application/__init__.py
  8. - FLASK_DEBUG=1
  9. - DATABASE_URL=postgresql://lviv_pt:admin@postgres:5432/lviv_pt_db
  10. - REDIS_URL=redis://redis:6379/0
  11. - CELERY_BROKER_URL=redis://redis:6379/0
  12. - CELERY_RESULT_BACKEND=redis://redis:6379/0
  13. build:
  14. context: .
  15. dockerfile: Dockerfile
  16. ports:
  17. - "5000:5000"
  18. depends_on:
  19. - postgres
  20. - celery
  21. - redis
  22. - publisher
  23.  
  24. celery:
  25. environment:
  26. - APP_SETTINGS=config.DevelopmentConfig
  27. - FLASK_APP=application/__init__.py
  28. - REDIS_URL=redis://redis:6379/0
  29. # build: .
  30. # command: celery -A application.tasks:celery worker --concurrency=3 --loglevel=info
  31. build:
  32. context: .
  33. dockerfile: Dockerfile-celery
  34.  
  35. redis:
  36. image: 'redis'
  37.  
  38. postgres:
  39. image: postgres
  40. environment:
  41. - POSTGRES_USER=lviv_pt
  42. - POSTGRES_PASSWORD=admin
  43. - POSTGRES_DB=lviv_pt_db
  44. ports:
  45. - "54321:5432"
  46. volumes:
  47. - ./postgres-data/postgres:/var/lib/postgresql/data
  48.  
  49. publisher:
  50. # image: 'python:3.6'
  51. environment:
  52. - APP_SETTINGS=config.DevelopmentConfig
  53. - DATABASE_URL=postgresql://lviv_pt:admin@postgres:5432/lviv_pt_db
  54. - REDIS_URL=redis://redis:6379/0
  55. - CELERY_BROKER_URL=redis://redis:6379/0
  56. - CELERY_RESULT_BACKEND=redis://redis:6379/0
  57. build:
  58. context: .
  59. dockerfile: Dockerfile-publisher
  60. # command: python publisher.py
  61.  
  62.  
  63. #https://medium.freecodecamp.org/docker-development-workflow-a-guide-with-flask-and-postgres-db1a1843044a
  64. #docker-compose build
  65. #docker-compose up app
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement