Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- version: '3'
- services:
- app:
- environment:
- - APP_SETTINGS=config.DevelopmentConfig
- - FLASK_APP=application/__init__.py
- - FLASK_DEBUG=1
- - DATABASE_URL=postgresql://lviv_pt:admin@postgres:5432/lviv_pt_db
- - REDIS_URL=redis://redis:6379/0
- - CELERY_BROKER_URL=redis://redis:6379/0
- - CELERY_RESULT_BACKEND=redis://redis:6379/0
- build:
- context: .
- dockerfile: Dockerfile
- ports:
- - "5000:5000"
- depends_on:
- - postgres
- - celery
- - redis
- - publisher
- celery:
- environment:
- - APP_SETTINGS=config.DevelopmentConfig
- - FLASK_APP=application/__init__.py
- - REDIS_URL=redis://redis:6379/0
- # build: .
- # command: celery -A application.tasks:celery worker --concurrency=3 --loglevel=info
- build:
- context: .
- dockerfile: Dockerfile-celery
- redis:
- image: 'redis'
- postgres:
- image: postgres
- environment:
- - POSTGRES_USER=lviv_pt
- - POSTGRES_PASSWORD=admin
- - POSTGRES_DB=lviv_pt_db
- ports:
- - "54321:5432"
- volumes:
- - ./postgres-data/postgres:/var/lib/postgresql/data
- publisher:
- # image: 'python:3.6'
- environment:
- - APP_SETTINGS=config.DevelopmentConfig
- - DATABASE_URL=postgresql://lviv_pt:admin@postgres:5432/lviv_pt_db
- - REDIS_URL=redis://redis:6379/0
- - CELERY_BROKER_URL=redis://redis:6379/0
- - CELERY_RESULT_BACKEND=redis://redis:6379/0
- build:
- context: .
- dockerfile: Dockerfile-publisher
- # command: python publisher.py
- #https://medium.freecodecamp.org/docker-development-workflow-a-guide-with-flask-and-postgres-db1a1843044a
- #docker-compose build
- #docker-compose up app
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement