Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- version: '2'
- services:
- rabbit:
- restart: always
- hostname: rabbit
- image: rabbitmq:3.6.0
- container_name: rabbit_wikiwroks
- environment:
- - RABBITMQ_DEFAULT_USER=django
- - RABBITMQ_DEFAULT_PASS=django
- ports:
- - "5672:5672" # we forward this port because it's useful for debugging
- postgresql:
- restart: always
- image: postgres:10.5
- container_name: postgresql_wikiwroks
- env_file: .env
- volumes:
- - db-data:/var/lib/postgresql/data/pgdata
- ports:
- - "5454:5432"
- - "5050"
- # - "5050:5050"
- # - "5432"
- redis:
- restart: always
- image: redis:latest
- container_name: redis_wikiwroks
- # ports:
- # - '6379:6379'
- ports:
- - '6379'
- depends_on:
- - rabbit
- web:
- restart: always
- build: .
- command: /bin/bash -c "pip install -r requirements.txt; python manage.py collectstatic --no-input; python manage.py migrate; python manage.py createcachetable cache; python manage.py createcachetable cache_select2; gunicorn -w 4 --bind :8003 --reload --chdir /src --pid=/tmp/wikiworks.pid --worker-class gevent wsgi:application "
- # command: /bin/bash -c " pip install -r requirements.txt; python manage.py makemigrations; python manage.py migrate; python manage.py collectstatic --no-input; python manage.py runserver 0.0.0.0:8003 "
- container_name: web_wikiwroks
- env_file: .env
- volumes:
- - ./src:/src
- # - .:/src
- # - ./src/static:/www/static
- # - ./src/media:/www/media/
- ports:
- - "8003:8003"
- links:
- - postgresql
- - rabbit
- - redis
- - sphinxsearch
- depends_on:
- - postgresql
- - rabbit
- - redis
- celery:
- restart: always
- build: .
- command: celery -A settings.new_celery worker -l info -B -E --loglevel=debug --concurrency=4
- container_name: celery_wikiwroks
- env_file: .env
- volumes:
- - ./src:/src
- links:
- - postgresql
- depends_on:
- - postgresql
- - rabbit
- - redis
- - web
- celery-beat:
- restart: always
- build: .
- command: /bin/bash -c " rm -f /src/celeryev.pid; celery -A settings.new_celery events -l info --camera django_celery_monitor.camera.Camera --frequency=2.0 "
- container_name: celery_beat_wikiwroks
- env_file: .env
- volumes:
- - ./src:/src
- depends_on:
- - postgresql
- - rabbit
- - redis
- - web
- nginx:
- restart: always
- # image: nginx:latest
- # image: roberto/nginx-upload-with-progress-modules:latest
- image: dimka2014/nginx-upload-with-progress-modules:latest
- container_name: nginx_wikiwroks
- ports:
- - "8000:8000"
- volumes:
- - ./src:/src
- - ./config/nginx:/etc/nginx/conf.d
- - ./src/static:/static
- - ./src/media:/media/
- depends_on:
- - web
- sphinxsearch:
- restart: always
- container_name: sphinxsearch_wikiwroks
- build: ./sphinx
- # image: sphinx:latest
- command: /etc/sphinxsearch/start.sh
- volumes:
- - ./sphinx:/etc/sphinxsearch
- - ./sphinx_data:/var/lib/sphinxsearch/data
- links:
- - postgresql
- depends_on:
- - postgresql
- volumes:
- db-data:
Add Comment
Please, Sign In to add comment