version: '3'
services:
  postgres:
    image: postgres
  rabbitmq:
    image: rabbitmq:3
  learning-circles:
    build: .
    image: learning-circles
    ports:
    - "8000:8000"
    volumes:
    - .:/opt/app
    depends_on:
    - rabbitmq
    - postgres
    command: /opt/django-venv/bin/python manage.py runserver 0.0.0.0:8000
    environment:
    - DATABASE_URL=postgres://lc:password@postgres:5432/lc
    - SECRET_KEY=321
    - BROKER_URL=amqp://guest:guest@rabbitmq//
    - DEBUG=true
  frontend:
    image: p2pu/js-build:carbon-alpine
    volumes: 
    - .:/opt/app
    working_dir: /opt/app
    command: sh -c "npm i && npm run watch"
# celery:
#   image: learning-circles
#   depends_on:
#   - rabbitmq
#   - postgres
#   command: /opt/django-venv/bin/celery worker -A learnwithpeople --loglevel=INFO
#   environment:
#   - DATABASE_URL=postgres://lc:password@postgres:5432/lc
#   - SECRET_KEY=321
#   - BROKER_URL=amqp://guest:guest@rabbitmq//
# celery-beat:
#   image: learning-circles
#   depends_on:
#   - rabbitmq
#   - postgres
#   command: /opt/django-venv/bin/celery beat -A learnwithpeople --loglevel=DEBUG --pidfile=/var/lib/celery/celerybeat.pid --schedule=/var/lib/celery/celerybeat-schedule
#   environment:
#   - DATABASE_URL=postgres://lc:password@postgres:5432/lc
#   - SECRET_KEY=321
#   - BROKER_URL=amqp://guest:guest@rabbitmq//

version: '3'
services:
  postgres:
    image: postgres
  email:
    image: djfarrelly/maildev
    ports:
    - 1080:80
  learning-circles:
    build: .
    image: learning-circles
    ports:
    - "8000:8000"
    volumes:
    - .:/opt/app
    depends_on:
    - postgres
    - email
    command: /opt/django-venv/bin/python manage.py runserver 0.0.0.0:8000
    environment:
    - DATABASE_URL=postgres://lc:password@postgres:5432/lc
    - SECRET_KEY=321
    - BROKER_URL=amqp://guest:guest@rabbitmq//
    - EMAIL_HOST=email
    - COMMUNITY_MANAGER=user@mail.com
    - DEFAULT_FROM_EMAIL=notify@mail.com
    - DEBUG=true
  frontend:
    image: p2pu/js-build:carbon-alpine
    volumes: 
    - .:/opt/app
    working_dir: /opt/app
    command: sh -c "npm i && npm run watch"


Add maildev for email testing
Add maildev for email testing
