-
-
Save glimberger/50ee9b7f0340c41f3e7fefd402a05768 to your computer and use it in GitHub Desktop.
Docker Compose for Symfony: PHP 7.1 - Postgres - PhpPgAdmin - Selenium Hub + Chrome/Firefox/PhantomJS nodes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # DATABASE | |
| DATABASE_DATA_DIR=./docker/postgres/data | |
| DATABASE_LOG_DIR=./docker/postgres/logs | |
| DATABASE_HOST=db | |
| DATABASE_PORT=5432 | |
| DATABASE_NAME=mydbname | |
| DATABASE_USER=myusername | |
| DATABASE_PASSWORD=mypassword | |
| # phpPgAdmin | |
| PHP_PG_ADMIN_PORT=8089 | |
| # RabbitMQ | |
| RABBITMQ_USER=admin | |
| RABBITMQ_PASSWORD=admin | |
| RABBITMQ_ADMIN_PORT=60000 | |
| # APP | |
| APACHE_LOG_DIR=./docker/web/logs/apache2 | |
| SYMFONY_LOG_DIR=./docker/web/logs/symfony | |
| HOST_PORT=8080 | |
| APP_DIR=./ | |
| # COMPOSER | |
| # Default cache dir on OSX/Linux | |
| COMPOSER_DIR=~/.composer | |
| # Default cache dir on Windows | |
| # COMPOSER_DIR=%LOCALAPPDATA%/Composer | |
| # YARN | |
| # run 'yarn cache dir' to print the cache dir path | |
| # Default cache dir on OSX | |
| YARN_CACHE_DIR=~/Library/Caches/Yarn/v1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: '2' | |
| services: | |
| db: | |
| image: postgres:alpine | |
| volumes: | |
| - ${DATABASE_DATA_DIR}:/var/lib/postgresql/data | |
| - ${DATABASE_LOG_DIR}:/var/log/postgresql | |
| ports: | |
| - "${DATABASE_PORT}:5432" | |
| environment: | |
| - POSTGRES_PASSWORD=${DATABASE_PASSWORD} | |
| - POSTGRES_USER=${DATABASE_USER} | |
| - POSTGRES_DB=${DATABASE_NAME} | |
| - PGDATA=/var/lib/postgresql/data/pgdata | |
| phppgadmin: | |
| # fixed fork of jacksoncage/phppgadmin | |
| image: einfallstoll/phppgadmin | |
| ports: | |
| - "${PHP_PG_ADMIN_PORT}:80" | |
| environment: | |
| - POSTGRES_HOST=db | |
| - POSTGRES_PORT=${DATABASE_PORT} | |
| - POSTGRES_DEFAULTDB=${DATABASE_NAME} | |
| links: | |
| - db:postgres | |
| app: | |
| image: debian | |
| volumes: | |
| - ${APP_DIR}:/var/www/html | |
| - ${COMPOSER_DIR}:/root/.composer | |
| - ${YARN_CACHE_DIR}:/usr/local/share/.cache/yarn/v1 | |
| - ${APACHE_LOG_DIR}:/var/log/apache2 | |
| - ${SYMFONY_LOG_DIR}:/var/www/html/var/logs | |
| web: | |
| image: gl1m/docker-php | |
| ports: | |
| - "${HOST_PORT}:80" | |
| environment: | |
| - XDEBUG_CONFIG=remote_host=192.168.0.1 | |
| - DATABASE_HOST=${DATABASE_HOST} | |
| - DATABASE_PORT=${DATABASE_PORT} | |
| - DATABASE_NAME=${DATABASE_NAME} | |
| - DATABASE_USER=${DATABASE_USER} | |
| - DATABASE_PASSWORD=${DATABASE_PASSWORD} | |
| - HUB_PORT_4444_TCP_ADDR=hub | |
| - HUB_PORT_4444_TCP_PORT=4444 | |
| volumes_from: | |
| - app | |
| depends_on: | |
| - chrome | |
| - firefox | |
| - hub | |
| links: | |
| - db:postgres | |
| - hub | |
| hub: | |
| image: selenium/hub | |
| ports: | |
| - "4444:4444" | |
| chrome: | |
| image: selenium/node-chrome | |
| depends_on: | |
| - hub | |
| links: | |
| - hub | |
| environment: | |
| - HUB_PORT_4444_TCP_ADDR=hub | |
| - HUB_PORT_4444_TCP_PORT=4444 | |
| firefox: | |
| image: selenium/node-firefox | |
| depends_on: | |
| - hub | |
| links: | |
| - hub | |
| environment: | |
| - HUB_PORT_4444_TCP_ADDR=hub | |
| - HUB_PORT_4444_TCP_PORT=4444 | |
| phantomjs: | |
| image: selenium/node-phantomjs | |
| depends_on: | |
| - hub | |
| links: | |
| - hub | |
| environment: | |
| - HUB_PORT_4444_TCP_ADDR=hub | |
| - HUB_PORT_4444_TCP_PORT=4444 | |
| rabbit: | |
| image: rabbitmq:3-management | |
| hostname: rabbit-node-1 | |
| ports: | |
| - ${RABBITMQ_ADMIN_PORT}:15672 | |
| environment: | |
| - RABBITMQ_DEFAULT_USER=${RABBITMQ_USER} | |
| - RABBITMQ_DEFAULT_PASS=${RABBITMQ_PASSWORD} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment