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 - ../apigrabber:/apps/api - ../preloader:/apps/preloader - ../compiler:/apps/stats - ../analyzer:/apps/climate - ../cruncher:/apps/cruncher ### Workspace Utilities Container ########################### workspace: container_name: vaindock_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" ports: - "2222:22" links: - vaindock_postgres_raw - vaindock_postgres_web tty: true ### PHP-FPM Container ####################################### php-fpm: container_name: vaindock_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 expose: - "9000" links: - workspace - vaindock_postgres_raw - vaindock_postgres_web 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 Server Container ################################## ### The webroot is mapped to vainsocial.dev (entry in hosts file) nginx: container_name: vaindock_nginx build: context: ./nginx args: - PHP_UPSTREAM=php-fpm volumes_from: - applications volumes: - ./logs/nginx/:/var/log/nginx - ./nginx/sites/:/etc/nginx/sites-available ports: - "88:80" - "443:443" links: - php-fpm ### Python Container for apigrabber apigrabber: container_name: vaindock_apigrabber build: ./python volumes_from: - applications links: - vaindock_postgres_raw environment: - POSTGRESQL_HOST=vaindock_postgres_raw - POSTGRESQL_PORT=5432 - POSTGRESQL_DB=vainsocial-raw - POSTGRESQL_USER=vainraw - POSTGRESQL_PASSWORD=vainraw - VAINSOCIAL_REGIONS=sg - VAINSOCIAL_STARTDATE=2017-02-18T00:00:01Z - VAINSOCIAL_ENDDATE=2017-02-25T00:00:00Z env_file: - local.env ### Python Container for preloader preloader: container_name: vaindock_preloader build: ./python volumes: - ../preloader:/apps/api links: - vaindock_postgres_raw environment: - POSTGRESQL_HOST=vaindock_postgres_raw - POSTGRESQL_PORT=5432 - POSTGRESQL_DB=vainsocial-raw - POSTGRESQL_USER=vainraw - POSTGRESQL_PASSWORD=vainraw - VAINSOCIAL_SPIDERTHROTTLE=5 env_file: - local.env ### Python Container for processor processor: build: ./python volumes: - ../processor:/apps/api links: - vaindock_postgres_raw - vaindock_postgres_web environment: - POSTGRESQL_SOURCE_HOST=vaindock_postgres_raw - POSTGRESQL_SOURCE_PORT=5432 - POSTGRESQL_SOURCE_DB=vainsocial-raw - POSTGRESQL_SOURCE_USER=vainraw - POSTGRESQL_SOURCE_PASSWORD=vainraw - POSTGRESQL_DEST_HOST=vaindock_postgres_web - POSTGRESQL_DEST_PORT=5432 - POSTGRESQL_DEST_DB=vainsocial-web - POSTGRESQL_DEST_USER=vainweb - POSTGRESQL_DEST_PASSWORD=vainweb - VAINSOCIAL_SPIDER=true - VAINSOCIAL_ANALYZE=true ### Python Container for compiler compiler: build: ./python volumes: - ../compiler:/apps/api links: - vaindock_postgres_raw - vaindock_postgres_web environment: - POSTGRESQL_SOURCE_HOST=vaindock_postgres_raw - POSTGRESQL_SOURCE_PORT=5432 - POSTGRESQL_SOURCE_DB=vainsocial-raw - POSTGRESQL_SOURCE_USER=vainraw - POSTGRESQL_SOURCE_PASSWORD=vainraw - POSTGRESQL_DEST_HOST=vaindock_postgres_web - POSTGRESQL_DEST_PORT=5432 - POSTGRESQL_DEST_DB=vainsocial-web - POSTGRESQL_DEST_USER=vainweb - POSTGRESQL_DEST_PASSWORD=vainweb ### Python Container for analyzer analyzer: build: ./python volumes: - ../analyzer:/apps/api links: - vaindock_postgres_raw - vaindock_postgres_web environment: - POSTGRESQL_SOURCE_HOST=vaindock_postgres_raw - POSTGRESQL_SOURCE_PORT=5432 - POSTGRESQL_SOURCE_DB=vainsocial-raw - POSTGRESQL_SOURCE_USER=vainraw - POSTGRESQL_SOURCE_PASSWORD=vainraw - POSTGRESQL_DEST_HOST=vaindock_postgres_web - POSTGRESQL_DEST_PORT=5432 - POSTGRESQL_DEST_DB=vainsocial-web - POSTGRESQL_DEST_USER=vainweb - POSTGRESQL_DEST_PASSWORD=vainweb ### Python Container for cruncher cruncher: build: ./python volumes: - ../cruncher:/apps/api links: - vaindock_postgres_raw - vaindock_postgres_web environment: - POSTGRESQL_SOURCE_HOST=vaindock_postgres_raw - POSTGRESQL_SOURCE_PORT=5432 - POSTGRESQL_SOURCE_DB=vainsocial-raw - POSTGRESQL_SOURCE_USER=vainraw - POSTGRESQL_SOURCE_PASSWORD=vainraw - POSTGRESQL_DEST_HOST=vaindock_postgres_web - POSTGRESQL_DEST_PORT=5432 - POSTGRESQL_DEST_DB=vainsocial-web - POSTGRESQL_DEST_USER=vainweb - POSTGRESQL_DEST_PASSWORD=vainweb ### PostgreSQL Container - Web #################################### vaindock_postgres_web: container_name: vaindock_postgres_web build: ./postgres volumes: - vaindock_pg_web:/var/lib/postgresql/data ports: - "5432:5432" environment: POSTGRES_DB: vainsocial-web POSTGRES_USER: vainweb POSTGRES_PASSWORD: vainweb ### PostgreSQL Container - Raw #################################### vaindock_postgres_raw: container_name: vaindock_postgres_raw build: ./postgres volumes: - vaindock_pg_raw:/var/lib/postgresql/data ports: - "5433:5432" environment: POSTGRES_DB: vainsocial-raw POSTGRES_USER: vainraw POSTGRES_PASSWORD: vainraw ### pgAdmin Container ####################################### pgadmin: container_name: vaindock_pgadmin build: ./pgadmin ports: - "5050:5050" links: - vaindock_postgres_raw - vaindock_postgres_web ### Volumes Setup ########################################### volumes: vaindock_pg_raw: driver: "local" vaindock_pg_web: driver: "local" sessions: ## nothing is connected to this (- ./data/sessions:/sessions) driver: "local" ### Apache Server Container ################################# # apache2: # build: # context: ./apache2 # args: # - PHP_SOCKET=php-fpm:9000 # volumes_from: # - applications # volumes: # - ./logs/apache2:/var/log/apache2 # ports: # - "80:80" # - "443:443" # links: # - php-fpm