Git Product home page Git Product logo

docker-compose's Introduction

This is docker-compose with included: PHP (7.0, 7.1, 7.2, 7.3, 7.4, 8.0, 8.1), Nginx, MySQL, Redis, Memcached, RabbitMQ

How to use?

  1. Clone this repository: git clone https://github.com/vityachis/docker-compose.git
  2. Copy docker-compose.yml and docker to your project root directory
  3. Rename the folder with required PHP version to php (in docker folder)
  4. Delete unnecessary PHP versions from docker folder
  5. Set ENV variables (if need)
  6. Configure Xdebug in PhpStorm
  7. ENJOY :)

Global ENV variables:

Mapping local ports to ports in Docker container (ports for services in Docker container remain default): APP_PORT, APP_SECURE_PORT, MYSQL_PORT, REDIS_PORT, RABBITMQ_PORT, RABBITMQ_MANAGEMENT_PORT
  • ROOT_PATH (default /var/www/public)

  • APP_PORT (default 80)
  • APP_SECURE_PORT (default 443)
  • XDEBUG_PORT (default: 9003)
  • XDEBUG_IDEKEY (default IDEKEY)
  • NGINX_HOST (default app.local)

  • MYSQL_PORT (default 3306)
  • DB_DATABASE (default app)
  • DB_USERNAME (default app)
  • DB_PASSWORD (default app)
  • DB_ROOT_USERNAME (default uroot)
  • DB_ROOT_PASSWORD (default proot)

  • REDIS_PORT (default 6379)

  • RABBITMQ_PORT (default 5672)
  • RABBITMQ_MANAGEMENT_PORT (default 15672)
  • RABBITMQ_USER (default guest)
  • RABBITMQ_PASS (default guest)

Settings Xdebug for PhpStorm:

  1. Preferences
  2. PHP:
    • Add new CLI Interpreters:
      • Server: Docker
      • Image name: %PROJECT_FOLDER_NAME%_php:latest
    • Path mappings (or Docker container [Host path] -> [Container path]):
      • <Project root> -> /var/www
    • Xdebug:
      • Debug port: ${XDEBUG_PORT}
      • DBGp Proxy: IDE key: ${XDEBUG_IDEKEY}; Host: host.docker.internal; Port: ${XDEBUG_PORT}
    • Servers:
      • Host: ${nginx_host} (this is NOT an environment variable)
      • Port: 80
      • Debugger: Xdebug
      • Use path mappings: <Project root> -> /var/www; <Root path (where is index.php)> -> ${ROOT_PATH}

docker-compose's People

Contributors

vityachis avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.