Advertisement
Guest User

Untitled

a guest
Dec 8th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.79 KB | None | 0 0
  1. version: '3'
  2.  
  3. volumes:
  4.     pg_data:
  5.       driver: local
  6.     elastic_data:
  7.       driver: local
  8.  
  9. services:
  10.   pg:
  11.     image: postgres:9.6
  12.     environment:
  13.       POSTGRES_USER: pguser
  14.       POSTGRES_PASSWORD: pgpass
  15.       POSTGRES_DB: pgdb
  16.     ports:
  17.      - 5591:5432
  18.     volumes:
  19.      - pg_data:/var/lib/postgresql/data
  20.  
  21.   elastic:
  22.     image: docker.elastic.co/elasticsearch/elasticsearch:5.6.5
  23.     environment:
  24.      - "ES_JAVA_OPTS=-Xms256m -Xmx256m"
  25.     ulimits:
  26.       memlock:
  27.         soft: -1
  28.         hard: -1
  29.     volumes:
  30.      - elastic_data:/usr/share/elasticsearch/data
  31.     ports:
  32.      - 5594:9200
  33.  
  34.   rabbit:
  35.     image: rabbitmq:3.6
  36.     environment:
  37.       RABBITMQ_DEFAULT_USER: rabuser
  38.       RABBITMQ_DEFAULT_PASS: rabpass
  39.       RABBITMQ_DEFAULT_VHOST: projectname
  40.     ports:
  41.      - 5592:5672
  42.       - 5593:15672
  43.  
  44.   celery:
  45.     build: ./backend
  46.     command: celery worker --app projectname --loglevel INFO
  47.     volumes:
  48.      - ./backend/:/opt/projectname/backend/
  49.     depends_on:
  50.      - pg
  51.       - elastic
  52.       - rabbit
  53.  
  54.   flower:
  55.     build: ./backend
  56.     command: flower -A projectname --port=8081
  57.     volumes:
  58.      - ./backend/:/opt/projectname/backend/
  59.     depends_on:
  60.      - celery
  61.     ports:
  62.      - 5595:8081
  63.  
  64.   backend:
  65.     build: ./backend
  66.     command: python manage.py runserver 0.0.0.0:8080
  67.     volumes:
  68.      - ./backend/:/opt/projectname/backend/
  69.       - ./frontend/dist/:/opt/projectname/backend/common/static/
  70.     ports:
  71.      - 5590:8080
  72.     depends_on:
  73.      - pg
  74.       - elastic
  75.       - celery
  76.       - frontend
  77.  
  78.   frontend:
  79.     image: node:8
  80.     working_dir: /opt/projectname/frontend/
  81.     command: bash -c "yarn install && node_modules/.bin/webpack --watch"
  82.     volumes:
  83.      - ./frontend/:/opt/projectname/frontend/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement