version: '2' services: ### Applications Code Container ############################# applications: image: tianon/true volumes: # as long as all the Vainglory repo are checked out on the same level this will work just fine # volume to map Vainsocial.com code. used by Workspace repo. - ../vainsocial/:/var/www/vainsocial backend: image: tianon/true depends_on: - queue - db-web # - db-brawl - db-tournament - bridge - processor # - processor_brawl - processor_tournament - shrinker - shrinker_brawl - shrinker_tournament - apigrabber # - apigrabber_brawl - apigrabber_tournament - cruncher_global - cruncher_player - cruncher_global_tournament - telesucker - telesucker_tournament - analyzer # - analyzer_tournament backend_light: image: tianon/true depends_on: - queue - db-web - db-brawl - db-tournament - bridge - processor - shrinker - apigrabber - cruncher_global - cruncher_player - telesucker frontend: image: tianon/true depends_on: - nginx - queue - php-fpm - db-web - phpmyadmin ### Workspace Utilities Container ########################### workspace: container_name: workspace build: context: ./workspace args: - INSTALL_XDEBUG=true - INSTALL_NODE=false # required is node is not installed locally - INSTALL_YARN=false - INSTALL_V8JS_EXTENSION=false - COMPOSER_GLOBAL_INSTALL=true # required if composer is not installed locally - INSTALL_WORKSPACE_SSH=true - INSTALL_LARAVEL_ENVOY=false - INSTALL_DEPLOYER=false - PUID=1000 - PGID=1000 - NODE_VERSION=stable - YARN_VERSION=latest - TZ=UTC volumes_from: - applications extra_hosts: # IMPORTANT: Replace with your Docker Host IP (will be appended to /etc/hosts) - "dockerhost:10.0.75.1" #links: #- db-web #- db-brawl #- db-tournament ports: - "2222:22" tty: true ### PHP-FPM Container ####################################### php-fpm: container_name: php-fpm build: context: ./php-fpm args: - INSTALL_XDEBUG=true - INSTALL_SOAP=false - INSTALL_MONGO=false - INSTALL_ZIP_ARCHIVE=false - INSTALL_BCMATH=false - INSTALL_PHPREDIS=true - INSTALL_MEMCACHED=false - INSTALL_OPCACHE=false - INSTALL_EXIF=false dockerfile: Dockerfile-70 volumes_from: - applications #- db-web expose: - "9000" links: - workspace #- db-web #- db-brawl #- db-tournament extra_hosts: # IMPORTANT: Replace with your Docker Host IP (will be appended to /etc/hosts) - "dockerhost:10.0.75.1" environment: # IMPORTANT: Set the Remote Interpreter entry matching name to `laravel` - PHP_IDE_CONFIG=serverName=laravel nginx: build: context: ./nginx args: - PHP_UPSTREAM=php-fpm volumes_from: - applications volumes: - ./logs/nginx/:/var/log/nginx - ./nginx/sites/:/etc/nginx/sites-available links: - workspace - php-fpm #- queue #- bridge #- db-web #- db-brawl #- db-tournament ports: - "80:80" - "443:443" bridge: build: ../bridge stop_signal: SIGINT restart: on-failure ports: - "8880:8880" volumes: - ../bridge:/usr/src/app - ../orm:/usr/src/orm depends_on: - queue environment: - RABBITMQ_URI=amqp://bridge:bridge@queue/ - DATABASE_URI=mysql://vain:vain@192.168.2.35/vainweb - DATABASE_BRAWL_URI=mysql://vainbrawl:vainbrawl@db-brawl/vainbrawl - DATABASE_TOURNAMENT_URI=mysql://vaintournament:vaintournament@db-tournament/vaintournament - REGIONS=na,eu,sg,sa,ea - REGULAR_MODES=casual,ranked,casual_aral,blitz_pvp_ranked # TODO! - BRAWL_MODES=casual_aral,blitz_pvp_ranked - TOURNAMENT_MODES=private,private_party_draft_match - ANALYZE_MODES=casual,ranked - TOURNAMENT_REGIONS=tournament-na,tournament-eu,tournament-sg,tournament-sa,tournament-ea - BRAWL_RETENTION_DAYS=7 - PLAYER_PROCESS_QUEUE=process - GRAB_QUEUE=grab - GRAB_BRAWL_QUEUE=grab_brawl - GRAB_TOURNAMENT_QUEUE=grab_tournament - CRUNCH_QUEUE=crunch - CRUNCH_TOURNAMENT_QUEUE=crunch_tournament - SAMPLE_QUEUE=telesuck - SAMPLE_TOURNAMENT_QUEUE=telesuck - SHOVEL_SIZE=50000 - ANALYZE_QUEUE=analyze - ANALYZE_TOURNAMENT_QUEUE=analyze_tournament env_file: - local.env apigrabber: build: ../apigrabber stop_signal: SIGINT restart: on-failure volumes: - ../apigrabber:/usr/src/app - ../orm:/usr/src/orm depends_on: - queue environment: - RABBITMQ_URI=amqp://apigrabber:apigrabber@queue/ - QUEUE=grab - PROCESS_QUEUE=process - SAMPLE_QUEUE=telesuck env_file: - local.env apigrabber_brawl: build: ../apigrabber stop_signal: SIGINT restart: on-failure volumes: - ../apigrabber:/usr/src/app - ../orm:/usr/src/orm depends_on: - queue environment: - RABBITMQ_URI=amqp://apigrabber:apigrabber@queue/ - QUEUE=grab_brawl - PROCESS_QUEUE=process_brawl - SAMPLE_QUEUE=telesuck env_file: - local.env apigrabber_tournament: build: ../apigrabber stop_signal: SIGINT restart: on-failure volumes: - ../apigrabber:/usr/src/app - ../orm:/usr/src/orm depends_on: - queue environment: - RABBITMQ_URI=amqp://apigrabber:apigrabber@queue/ - QUEUE=grab_tournament - PROCESS_QUEUE=process_tournament - SAMPLE_QUEUE=telesuck env_file: - local.env telesucker: build: ../telesucker stop_signal: SIGINT restart: on-failure volumes: - ../telesucker:/usr/src/app - ../orm:/usr/src/orm depends_on: - queue environment: - RABBITMQ_URI=amqp://telesucker:telesucker@queue/ - QUEUE=telesuck - PROCESS_QUEUE=shrink - SAMPLERS=5 env_file: - local.env telesucker_tournament: build: ../telesucker stop_signal: SIGINT restart: on-failure volumes: - ../telesucker:/usr/src/app - ../orm:/usr/src/orm depends_on: - queue environment: - RABBITMQ_URI=amqp://telesucker:telesucker@queue/ - QUEUE=telesuck_tournament - PROCESS_QUEUE=shrink_tournament - SAMPLERS=5 env_file: - local.env processor: build: ../processor stop_signal: SIGINT restart: on-failure volumes: - ../processor:/usr/src/app - ../orm:/usr/src/orm depends_on: - queue environment: - RABBITMQ_URI=amqp://processor:processor@queue/ - DATABASE_URI=mysql://vain:vain@192.168.2.35/vainweb - QUEUE=process - DOANALYZEMATCH=true - ANALYZE_QUEUE=analyze processor_brawl: build: ../processor stop_signal: SIGINT restart: on-failure volumes: - ../processor:/usr/src/app - ../orm:/usr/src/orm depends_on: - queue - db-brawl environment: - RABBITMQ_URI=amqp://processor:processor@queue/ - DATABASE_URI=mysql://vainbrawl:vainbrawl@db-brawl/vainbrawl - QUEUE=process_brawl processor_tournament: build: ../processor stop_signal: SIGINT restart: on-failure volumes: - ../processor:/usr/src/app - ../orm:/usr/src/orm depends_on: - queue - db-tournament environment: - RABBITMQ_URI=amqp://processor:processor@queue/ - DATABASE_URI=mysql://vaintournament:vaintournament@db-tournament/vaintournament - QUEUE=process_tournament shrinker: build: ../shrinker stop_signal: SIGINT restart: on-failure volumes: - ../shrinker:/usr/src/app - ../orm:/usr/src/orm depends_on: - queue environment: - RABBITMQ_URI=amqp://shrinker:shrinker@queue/ - DATABASE_URI=mysql://vain:vain@192.168.2.35/vainweb - QUEUE=shrink - DOREAPMATCH=true - REAP_QUEUE=reap - BATCHSIZE=20 - CHUNKSIZE=20 - MAXCONNS=3 shrinker_brawl: build: ../shrinker stop_signal: SIGINT restart: on-failure volumes: - ../shrinker:/usr/src/app - ../orm:/usr/src/orm depends_on: - queue - db-brawl environment: - RABBITMQ_URI=amqp://shrinker:shrinker@queue/ - DATABASE_URI=mysql://vainbrawl:vainbrawl@db-brawl/vainbrawl - QUEUE=process_brawl shrinker_tournament: build: ../shrinker stop_signal: SIGINT restart: on-failure volumes: - ../shrinker:/usr/src/app - ../orm:/usr/src/orm depends_on: - queue - db-tournament environment: - RABBITMQ_URI=amqp://shrinker:shrinker@queue/ - DATABASE_URI=mysql://vaintournament:vaintournament@db-tournament/vaintournament - QUEUE=shrink_tournament reaper: build: ../reaper stop_signal: SIGINT restart: on-failure volumes: - ../reaper:/usr/src/app - ../orm:/usr/src/orm depends_on: - queue environment: - RABBITMQ_URI=amqp://reaper:reaper@queue/ - DATABASE_URI=mysql://vain:vain@192.168.2.35/vainweb - ELASTICSEARCH_URI=http://192.168.2.35:9200/ - QUEUE=reap - MAXCONNS=3 - BATCHSIZE=30 - IDLE_TIMEOUT=1000 cruncher_global: build: ../cruncher stop_signal: SIGINT restart: on-failure volumes: - ../cruncher:/usr/src/app - ../orm:/usr/src/orm depends_on: - queue environment: - RABBITMQ_URI=amqp://cruncher:cruncher@queue/ - DATABASE_URI=mysql://vain:vain@192.168.2.35/vainweb - QUEUE=crunch_global - SCRIPT=crunch_global.sql - BATCHSIZE=20 - SLOWMODE=0 cruncher_player: build: ../cruncher stop_signal: SIGINT restart: on-failure volumes: - ../cruncher:/usr/src/app - ../orm:/usr/src/orm depends_on: - queue environment: - RABBITMQ_URI=amqp://cruncher:cruncher@queue/ - DATABASE_URI=mysql://vain:vain@192.168.2.35/vainweb - QUEUE=crunch_player - SCRIPT=crunch_player.sql - BATCHSIZE=20 - SLOWMODE=0 cruncher_global_tournament: build: ../cruncher stop_signal: SIGINT restart: on-failure volumes: - ../cruncher:/usr/src/app - ../orm:/usr/src/orm depends_on: - queue #- db-web environment: - RABBITMQ_URI=amqp://cruncher:cruncher@queue/ - DATABASE_URI=mysql://vaintournament:vaintournament@db-tournament/vaintournament - QUEUE=crunch_tournament analyzer: build: ../analyzer restart: on-failure volumes: - ../analyzer:/usr/src/app depends_on: - queue environment: - RABBITMQ_URI=amqp://analyzer:analyzer@queue/ - DATABASE_URI=mysql+cymysql://vain:vain@192.168.2.35/vainweb - BATCHSIZE=30 - CHUNKSIZE=10 - QUEUE=analyze - DOCRUNCHMATCH=true - CRUNCH_PLAYER_QUEUE=crunch_player - DOTELESUCKMATCH=true - TELESUCK_QUEUE=telesuck analyzer_tournament: build: ../analyzer restart: on-failure volumes: - ../analyzer:/usr/src/app depends_on: - queue - db-tournament environment: - RABBITMQ_URI=amqp://analyzer:analyzer@queue/ - DATABASE_URI=mysql+cymysql://vaintournament:vaintournament@db-tournament/vaintournament - QUEUE=analyze_tournament - BATCHSIZE=500 - CHUNKSIZE=100 db-web: image: mariadb:10 volumes: - db-web-data:/var/lib/mysql ports: - "3306:3306" volumes: - ./mariadb:/etc/mysql/conf.d environment: MYSQL_DATABASE: vainweb MYSQL_USER: vainweb MYSQL_PASSWORD: vainweb MYSQL_ALLOW_EMPTY_PASSWORD: 1 db-brawl: image: mariadb:10 volumes: - db-brawl-data:/var/lib/mysql ports: - "3307:3306" environment: MYSQL_DATABASE: vainbrawl MYSQL_USER: vainbrawl MYSQL_PASSWORD: vainbrawl MYSQL_ALLOW_EMPTY_PASSWORD: 1 db-tournament: image: mariadb:10 volumes: - db-tournament-data:/var/lib/mysql ports: - "3308:3306" environment: MYSQL_DATABASE: vaintournament MYSQL_USER: vaintournament MYSQL_PASSWORD: vaintournament MYSQL_ALLOW_EMPTY_PASSWORD: 1 phpmyadmin: image: phpmyadmin/phpmyadmin:edge-4.7 environment: - PMA_ARBITRARY=1 ports: - "8882:80" volumes: - /sessions queue: build: ./rabbitmq hostname: queue volumes: - queue-data:/var/lib/queue ports: - "4369:4369" - "5671:5671" - "5672:5672" - "25672:25672" - "15674:15674" # web-stomp - "8881:15672" # management guest/guest environment: - RABBITMQ_HIPE_COMPILE=1 # - RABBITMQ_RECREATE_ON_STARTUP=true # for debugging volumes: db-web-data: driver: "local" db-brawl-data: driver: "local" db-tournament-data: driver: "local" queue-data: driver: "local" sessions: ## nothing is connected to this (- ./data/sessions:/sessions) driver: "local"