SHARE
TWEET

Untitled

a guest Jun 30th, 2018 107 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. version: '3'
  3.  
  4. services:
  5.   app:
  6.     environment:
  7.       - APP_SETTINGS=config.DevelopmentConfig
  8.       - FLASK_APP=application/__init__.py
  9.       - FLASK_DEBUG=1
  10.       - DATABASE_URL=postgresql://lviv_pt:admin@postgres:5432/lviv_pt_db
  11.       - REDIS_URL=redis://redis:6379/0
  12.       - CELERY_BROKER_URL=redis://redis:6379/0
  13.       - CELERY_RESULT_BACKEND=redis://redis:6379/0
  14.     build:
  15.      context: .
  16.      dockerfile: Dockerfile
  17.     ports:
  18.       - "5000:5000"
  19.     depends_on:
  20.        - postgres
  21.        - celery
  22.        - redis
  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. #      - FLASK_APP=application/__init__.py
  54.     build: .
  55.     command: python publisher.py
  56.  
  57.  
  58. #https://medium.freecodecamp.org/docker-development-workflow-a-guide-with-flask-and-postgres-db1a1843044a
  59. #docker-compose build
  60. #docker-compose up app
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top