├── var ├── log │ └── .gitkeep └── tmp │ └── .gitkeep ├── config ├── extends │ └── .gitkeep ├── auth.json.sample └── services.yaml ├── phpstan.neon ├── templates └── vendor │ └── defaultvalue │ └── dockerizer-templates │ ├── service │ ├── mysql_and_forks │ │ ├── mysql_initdb │ │ │ └── .gitkeep │ │ ├── mysql │ │ │ └── my.cnf │ │ ├── dv_mariadb_10_2_and_above.yaml │ │ ├── dv_mariadb_10_1.yaml │ │ ├── dv_mysql_8_0.yaml │ │ ├── dv_mysql_5_6_and_5_7.yaml │ │ └── dv_bitnami_mariadb.yaml │ ├── redis │ │ └── dv_redis.yaml │ ├── reverse_proxy │ │ ├── traefik │ │ │ ├── configuration │ │ │ │ └── certificates.toml │ │ │ └── traefik.toml │ │ ├── dv_traefik.yaml │ │ └── dv_traefik_bridge_network.yaml │ ├── varnish │ │ ├── dv_varnish_magento.yaml │ │ ├── dv_varnish_4_magento.yaml │ │ ├── dv_varnish_shopware_6_hard_purge.yaml │ │ └── dv_varnish_shopware_6_soft_purge.yaml │ ├── php │ │ ├── apache │ │ │ ├── virtual-host-unsecure.conf │ │ │ └── virtual-host.conf │ │ ├── dv_php_apache_unsecure_8_3.yaml │ │ ├── dv_php_apache_unsecure.yaml │ │ ├── dv_php_apache_8_3.yaml │ │ └── dv_php_apache.yaml │ ├── opensearch │ │ ├── opensearch.yaml │ │ └── magento_opensearch.yaml │ ├── elasticsearch │ │ └── dv_elasticsearch.yaml │ ├── rabbitmq │ │ └── dv_rabbitmq.yaml │ └── nginx │ │ ├── nginx_proxy_for_varnish │ │ └── virtual-host.conf │ │ └── dv_nginx_proxy_for_varnish.yaml │ ├── composition │ ├── traefik.yaml │ ├── magento │ │ ├── magento_2.4.1_apache.yaml │ │ ├── magento_2.4.2_apache.yaml │ │ ├── magento_2.4.3-p2_apache.yaml │ │ ├── magento_2.4.3_2.4.3-p1_apache.yaml │ │ ├── magento_2.3.6_apache.yaml │ │ ├── magento_2.3.7-p3_apache.yaml │ │ ├── magento_2.3.7_2.3.7-p2_apache.yaml │ │ ├── magento_2.4.4_apache_p8.yaml │ │ ├── magento_2.4.5_apache_p0_p6.yaml │ │ ├── magento_2.4.5_apache_p7.yaml │ │ ├── magento_2.4.4_apache_p3_p7.yaml │ │ ├── magento_2.4.4_apache_p0_p2.yaml │ │ ├── magento_2.4.1_nginx_varnish_apache.yaml │ │ ├── magento_2.4.2_nginx_varnish_apache.yaml │ │ ├── magento_2.3.6_nginx_varnish_apache.yaml │ │ ├── magento_2.4.3-p2_nginx_varnish_apache.yaml │ │ ├── magento_2.3.5_apache.yaml │ │ ├── magento_2.3.7-p3_nginx_varnish_apache.yaml │ │ ├── magento_2.4.3_2.4.3-p1_nginx_varnish_apache.yaml │ │ ├── magento_2.4.7_apache_beta3.yaml │ │ ├── magento_2.3.7_2.3.7-p2_nginx_varnish_apache.yaml │ │ ├── magento_2.4.7_apache_beta1_beta2.yaml │ │ ├── magento_2.4.6_apache_p5.yaml │ │ ├── magento_2.3.4_apache.yaml │ │ ├── magento_2.4.7_apache_p0.yaml │ │ ├── magento_2.4.4_nginx_varnish_apache_p8.yaml │ │ ├── magento_2.4.5_nginx_varnish_apache_p7.yaml │ │ ├── magento_2.4.4_nginx_varnish_apache_p3.yaml │ │ ├── magento_2.4.5_nginx_varnish_apache_p0_p1.yaml │ │ ├── magento_2.4.5_nginx_varnish_apache_p2.yaml │ │ ├── magento_2.4.6_apache_p0_p4.yaml │ │ ├── magento_2.4.4_nginx_varnish_apache_p4_p7.yaml │ │ ├── magento_2.4.5_nginx_varnish_apache_p3_p6.yaml │ │ ├── magento_2.4.4_nginx_varnish_apache_p0_p2.yaml │ │ ├── magento_2.2_apache.yaml │ │ ├── magento_2.3.3_apache.yaml │ │ └── magento_2.1_apache.yaml │ └── shopware │ │ ├── shopware_5.5.0-5.5.10_apache.yaml │ │ ├── shopware_5.6.0-5.6.9_apache.yaml │ │ └── shopware_5.7.x_apache.yaml │ └── dev_tools │ ├── php_apache_development_image.yaml │ ├── mailhog.yaml │ ├── phpmyadmin.yaml │ └── opensearch_dashboards.yaml ├── src ├── Docker │ ├── ContainerizedService │ │ ├── Readme.md │ │ ├── Opensearch.php │ │ ├── Generic.php │ │ ├── Php.php │ │ ├── ContainerStateException.php │ │ ├── Elasticsearch.php │ │ └── Mysql │ │ │ └── Metadata │ │ │ └── MetadataKeys.php │ ├── Compose │ │ ├── CompositionFilesNotFoundException.php │ │ ├── Composition │ │ │ ├── DevTools │ │ │ │ └── Collection.php │ │ │ ├── Service │ │ │ │ └── Collection.php │ │ │ ├── PostCompilation │ │ │ │ ├── ModifierInterface.php │ │ │ │ ├── ModifierCollection.php │ │ │ │ └── Modifier │ │ │ │ │ └── AbstractSslAwareModifier.php │ │ │ ├── DevTools.php │ │ │ └── Template │ │ │ │ └── Collection.php │ │ └── Collection.php │ ├── Image.php │ ├── Events.php │ └── Network.php ├── Filesystem │ ├── ProjectRootAwareInterface.php │ └── ProcessibleFile │ │ ├── AbstractFile.php │ │ └── AbstractFileCollection.php ├── Console │ ├── CommandArgument │ │ ├── CommandArgumentInterface.php │ │ └── Composition │ │ │ └── Template.php │ ├── CommandOption │ │ ├── ValidationException.php │ │ ├── InteractiveOptionInterface.php │ │ ├── OptionDefinitionInterface.php │ │ ├── ValidatableOptionInterface.php │ │ └── OptionDefinition │ │ │ ├── Exec.php │ │ │ ├── Force.php │ │ │ ├── Docker │ │ │ └── Compose │ │ │ │ └── Service.php │ │ │ └── OptionalServices.php │ ├── Command │ │ ├── Composition │ │ │ ├── Template │ │ │ │ ├── Validate.php │ │ │ │ └── Meta.php │ │ │ └── GetContainerName.php │ │ └── AbstractCompositionAwareCommand.php │ └── CommandLoggerTrait.php ├── DependencyInjection │ ├── DataTransferObjectInterface.php │ └── Factory.php ├── Shell │ ├── EnvironmentVariableMissedException.php │ └── Env.php ├── Platform │ └── Magento │ │ └── Exception │ │ ├── CleanupException.php │ │ ├── MagentoNotInstalledException.php │ │ └── InstallationDirectoryNotEmptyException.php ├── Validation │ └── Domain.php ├── Lib │ ├── ArrayHelper.php │ └── Security │ │ └── PasswordGenerator.php ├── AWS │ └── S3.php └── Kernel.php ├── docker_infrastructure_schema.png ├── .editorconfig ├── .gitignore ├── Dockerfile ├── .env.dist ├── DevGuidelines.md ├── bin └── dockerizer ├── Future.md └── composer.json /var/log/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /var/tmp/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /config/extends/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /phpstan.neon: -------------------------------------------------------------------------------- 1 | parameters: 2 | level: 8 3 | paths: 4 | - src -------------------------------------------------------------------------------- /templates/vendor/defaultvalue/dockerizer-templates/service/mysql_and_forks/mysql_initdb/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/Docker/ContainerizedService/Readme.md: -------------------------------------------------------------------------------- 1 | Classes to work with various dockerized services from the host system -------------------------------------------------------------------------------- /docker_infrastructure_schema.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DefaultValue/dockerizer_for_php/HEAD/docker_infrastructure_schema.png -------------------------------------------------------------------------------- /templates/vendor/defaultvalue/dockerizer-templates/service/redis/dv_redis.yaml: -------------------------------------------------------------------------------- 1 | services: 2 | redis: 3 | image: redis:{{redis_version}} 4 | restart: always -------------------------------------------------------------------------------- /templates/vendor/defaultvalue/dockerizer-templates/service/reverse_proxy/traefik/configuration/certificates.toml: -------------------------------------------------------------------------------- 1 | [tls] 2 | # [[tls.certificates]] 3 | # certFile = "/certs/example+1.pem" 4 | # keyFile = "/certs/example+1-key.pem" -------------------------------------------------------------------------------- /config/auth.json.sample: -------------------------------------------------------------------------------- 1 | { 2 | "github-oauth": { 3 | "github.com": "" 4 | }, 5 | "http-basic": { 6 | "repo.magento.com": { 7 | "username": "", 8 | "password": "" 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | indent_size = 4 7 | indent_style = space 8 | insert_final_newline = false 9 | trim_trailing_whitespace = true 10 | 11 | [*.php] 12 | insert_final_newline = true 13 | 14 | [{*.yaml,*.toml}] 15 | indent_size = 2 -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | auth.json 3 | /.env.local 4 | /.idea/* 5 | 6 | /config/* 7 | !/config/extends/ 8 | /config/extends/* 9 | !/config/extends/.gitkeep 10 | 11 | /var/* 12 | !/var/log/ 13 | /var/log/* 14 | !/var/log/.gitkeep 15 | !/var/tmp/ 16 | /var/tmp/* 17 | !/var/tmp/.gitkeep 18 | /vendor/* -------------------------------------------------------------------------------- /templates/vendor/defaultvalue/dockerizer-templates/service/mysql_and_forks/mysql/my.cnf: -------------------------------------------------------------------------------- 1 | [mysqld] 2 | #datadir=/var/lib/mysql_datadir/ 3 | wait_timeout=28800 4 | max_allowed_packet=128M 5 | innodb_log_file_size=128M 6 | innodb_buffer_pool_size=1G 7 | log_bin_trust_function_creators=1 8 | 9 | [mysql] 10 | auto-rehash -------------------------------------------------------------------------------- /templates/vendor/defaultvalue/dockerizer-templates/service/varnish/dv_varnish_magento.yaml: -------------------------------------------------------------------------------- 1 | version: '3.7' 2 | 3 | # Varnish 6 and 7 - https://hub.docker.com/_/varnish 4 | services: 5 | varnish-cache: 6 | image: varnish:{{varnish_version}} 7 | restart: always 8 | volumes: 9 | - ./varnish/varnish_magento.vcl:/etc/varnish/default.vcl:ro 10 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:8.0.2-cli 2 | 3 | RUN apt update 4 | 5 | RUN apt install -y libzip-dev zip unzip --no-install-recommends 6 | 7 | RUN docker-php-ext-install pcntl pdo_mysql zip 8 | 9 | RUN curl -k -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer 10 | 11 | RUN groupadd -g 1000 docker ; useradd -u 1000 -g docker -m docker -------------------------------------------------------------------------------- /templates/vendor/defaultvalue/dockerizer-templates/service/varnish/dv_varnish_4_magento.yaml: -------------------------------------------------------------------------------- 1 | version: '3.7' 2 | 3 | services: 4 | varnish-cache: 5 | image: eeacms/varnish:latest 6 | restart: always 7 | volumes: 8 | # `health_check.php` exists since Magento 2.2 9 | - ./varnish/varnish_magento_without_probe.vcl:/etc/varnish/conf.d/varnish.vcl:ro 10 | -------------------------------------------------------------------------------- /templates/vendor/defaultvalue/dockerizer-templates/composition/traefik.yaml: -------------------------------------------------------------------------------- 1 | app: 2 | description: Traefik reverse-proxy 3 | parameters: 4 | traefik_version: '2.10.7' 5 | composition: 6 | required: 7 | traefik: 8 | traefik_host_network: 9 | service: dv_traefik 10 | traefik_bridge_network: 11 | service: dv_traefik_bridge_network -------------------------------------------------------------------------------- /templates/vendor/defaultvalue/dockerizer-templates/service/varnish/dv_varnish_shopware_6_hard_purge.yaml: -------------------------------------------------------------------------------- 1 | version: '3.7' 2 | 3 | # Varnish 6 and 7 - https://hub.docker.com/_/varnish 4 | services: 5 | varnish-cache: 6 | image: varnish:{{varnish_version}} 7 | restart: always 8 | volumes: 9 | - ./varnish/varnish_shopware_6_4_hard_purge.vcl:/etc/varnish/default.vcl:ro 10 | -------------------------------------------------------------------------------- /templates/vendor/defaultvalue/dockerizer-templates/service/varnish/dv_varnish_shopware_6_soft_purge.yaml: -------------------------------------------------------------------------------- 1 | version: '3.7' 2 | 3 | # Varnish 6 and 7 - https://hub.docker.com/_/varnish 4 | services: 5 | varnish-cache: 6 | image: varnish:{{varnish_version}} 7 | restart: always 8 | volumes: 9 | - ./varnish/varnish_shopware_6_4_soft_purge.vcl:/etc/varnish/default.vcl:ro 10 | -------------------------------------------------------------------------------- /templates/vendor/defaultvalue/dockerizer-templates/service/php/apache/virtual-host-unsecure.conf: -------------------------------------------------------------------------------- 1 | 2 | ServerName php 3 | ServerAlias {{domains}} 4 | DocumentRoot /var/www/html/{{web_root}} 5 | ServerAdmin admin@example.com 6 | UseCanonicalName Off 7 | ErrorLog /var/www/html/var/log/apache_error.log 8 | 9 | AllowOverride All 10 | Require all granted 11 | 12 | -------------------------------------------------------------------------------- /.env.dist: -------------------------------------------------------------------------------- 1 | # Check wiki for more details about configuring Dockerizer and using these variables 2 | # 1. Filesystem settings. Must be set in the ~/.bash_aliases or ~/.bash_profile to share with Docker infrastructure project 3 | # DOCKERIZER_PROJECTS_ROOT_DIR=/home/user/misc/apps/ 4 | # DOCKERIZER_SSL_CERTIFICATES_DIR=/home/user/misc/share/ssl/ 5 | # 2. Traefik file with SSL certificates. Required for automatic SSL certificates propagation 6 | # DOCKERIZER_TRAEFIK_SSL_CONFIGURATION_FILE=/home/user/misc/apps/traefik-reverse-proxy/traefik/configuration/certificates.toml -------------------------------------------------------------------------------- /src/Filesystem/ProjectRootAwareInterface.php: -------------------------------------------------------------------------------- 1 | mustRun('php -r \'echo phpversion();\'', Shell::EXECUTION_TIMEOUT_SHORT, false); 24 | 25 | return trim($process->getOutput()); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /templates/vendor/defaultvalue/dockerizer-templates/service/reverse_proxy/dv_traefik.yaml: -------------------------------------------------------------------------------- 1 | version: '3.7' 2 | 3 | services: 4 | reverse-proxy: 5 | image: traefik:v{{traefik_version}} 6 | container_name: 'reverse-proxy' 7 | restart: always 8 | network_mode: host 9 | labels: 10 | - traefik.enable=true 11 | - traefik.http.routers.traefik-dashboard.rule=Host(`traefik.docker.local`) 12 | - traefik.http.routers.traefik-dashboard.entrypoints=http 13 | - traefik.http.routers.traefik-dashboard.service=api@internal 14 | - traefik.http.services.api@internal.loadbalancer.server.port=8080 15 | - traefik.http.services.api@internal.loadbalancer.server.port=http 16 | volumes: 17 | - /var/run/docker.sock:/var/run/docker.sock # So that Traefik can listen to the Docker events 18 | - ./traefik/traefik.toml:/traefik.toml:ro 19 | - ./traefik/configuration/:/configuration/:ro 20 | - ${DOCKERIZER_SSL_CERTIFICATES_DIR}:/certs/:ro -------------------------------------------------------------------------------- /src/Validation/Domain.php: -------------------------------------------------------------------------------- 1 | /etc/mysql/my.cnf > !includedir /etc/mysql/conf.d/ 22 | - './mysql/my.cnf:/etc/mysql/conf.d/zzz-my.cnf:ro' 23 | - ./mysql_initdb:/docker-entrypoint-initdb.d:ro -------------------------------------------------------------------------------- /templates/vendor/defaultvalue/dockerizer-templates/service/reverse_proxy/dv_traefik_bridge_network.yaml: -------------------------------------------------------------------------------- 1 | version: '3.7' 2 | 3 | services: 4 | reverse-proxy: 5 | image: traefik:v{{traefik_version}} 6 | container_name: 'reverse-proxy' 7 | restart: always 8 | network_mode: bridge 9 | ports: 10 | - '80:80' 11 | - '443:443' 12 | labels: 13 | - traefik.enable=true 14 | - traefik.http.routers.traefik-dashboard.rule=Host(`traefik.docker.local`) 15 | - traefik.http.routers.traefik-dashboard.entrypoints=http 16 | - traefik.http.routers.traefik-dashboard.service=api@internal 17 | - traefik.http.services.api@internal.loadbalancer.server.port=8080 18 | - traefik.http.services.api@internal.loadbalancer.server.port=http 19 | volumes: 20 | - /var/run/docker.sock:/var/run/docker.sock # So that Traefik can listen to the Docker events 21 | - ./traefik/traefik.toml:/traefik.toml:ro 22 | - ./traefik/configuration/:/configuration/:ro 23 | - ${DOCKERIZER_SSL_CERTIFICATES_DIR}:/certs/:ro -------------------------------------------------------------------------------- /src/Docker/Compose/Composition/DevTools.php: -------------------------------------------------------------------------------- 1 | getFileInfo()->getRealPath()); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /templates/vendor/defaultvalue/dockerizer-templates/dev_tools/opensearch_dashboards.yaml: -------------------------------------------------------------------------------- 1 | version: '3.7' 2 | 3 | services: 4 | opensearch_dashboards: 5 | # Make sure the version of opensearch-dashboards matches the version of opensearch installed on other nodes 6 | image: opensearchproject/opensearch-dashboards:{{opensearch_dashboards_version}} 7 | restart: always 8 | labels: 9 | - traefik.enable=true 10 | # Do not use subdomains to avoid HSTS issues 11 | - traefik.http.routers.opensearch-dashboards-{{environment}}-{{domains|first|replace:.:-}}-http.rule=Host(`opensearch-dashboards-{{environment}}-{{domains|first}}`) 12 | - traefik.http.routers.opensearch-dashboards-{{environment}}-{{domains|first|replace:.:-}}-http.entrypoints=http 13 | - traefik.http.services.opensearch-dashboards-{{domains|first|replace:.:-}}-http.loadbalancer.server.port=5601 14 | environment: 15 | OPENSEARCH_HOSTS: '["http://opensearch:9200"]' # Define the OpenSearch nodes that OpenSearch Dashboards will query 16 | DISABLE_SECURITY_DASHBOARDS_PLUGIN: 'true' -------------------------------------------------------------------------------- /templates/vendor/defaultvalue/dockerizer-templates/service/elasticsearch/dv_elasticsearch.yaml: -------------------------------------------------------------------------------- 1 | version: '3.7' 2 | 3 | volumes: 4 | elasticsearch_{{environment}}_data: 5 | external: false 6 | 7 | # https://hub.docker.com/_/elasticsearch/tags 8 | services: 9 | elasticsearch: 10 | image: elasticsearch:{{elasticsearch_version}} 11 | environment: 12 | - discovery.type=single-node 13 | - xpack.security.enabled=false 14 | - indices.query.bool.max_clause_count=10240 15 | - index.blocks.read_only_allow_delete 16 | - ES_JAVA_OPTS=-Xms1024m -Xmx1024m 17 | # Set hard limits instead of %? 18 | - cluster.routing.allocation.disk.threshold_enabled=true 19 | - cluster.routing.allocation.disk.watermark.low=2gb 20 | - cluster.routing.allocation.disk.watermark.high=1gb 21 | - cluster.routing.allocation.disk.watermark.flood_stage=512mb 22 | ulimits: 23 | memlock: 24 | soft: -1 25 | hard: -1 26 | restart: always 27 | volumes: 28 | - elasticsearch_{{environment}}_data:/usr/share/elasticsearch/data:rw -------------------------------------------------------------------------------- /bin/dockerizer: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | getApplication([dirname(__DIR__) . '/config']); 27 | $application->setAutoExit(true); 28 | $application->setCatchExceptions(false); 29 | 30 | $application->run(); 31 | } catch (\Throwable $e) { 32 | echo $e->getMessage() . PHP_EOL; 33 | echo $e->getTraceAsString(); 34 | } 35 | -------------------------------------------------------------------------------- /templates/vendor/defaultvalue/dockerizer-templates/service/php/dv_php_apache_unsecure.yaml: -------------------------------------------------------------------------------- 1 | version: '3.7' 2 | 3 | # Unsecure version of Apache configuration. Can be used if there is SSL termination proxy behind (Nginx, Traefik, etc.) 4 | services: 5 | php: 6 | # Must be enclosed in double quotes, otherwise YAML is invalid 7 | # Container name is used to identify container with PHP to install application 8 | container_name: '{{domains|first}}-apache-{{environment}}' 9 | image: defaultvalue/php:{{php_version}}-production 10 | user: docker:docker 11 | sysctls: 12 | - net.ipv4.ip_unprivileged_port_start=0 13 | restart: always 14 | environment: 15 | - COMPOSER_VERSION={{composer_version}} # Does not affect PHP 8.3 and later images 16 | volumes: 17 | - .:/var/www/html 18 | # Substitute default host file so that it does not interact with our custom host 19 | - ./apache/virtual-host-unsecure.conf:/etc/apache2/sites-enabled/000-default.conf:ro 20 | # For testing with composer packages cache 21 | #- ${HOME}/misc/apps/composer_package_cache:/home/docker/.composer/cache -------------------------------------------------------------------------------- /templates/vendor/defaultvalue/dockerizer-templates/service/rabbitmq/dv_rabbitmq.yaml: -------------------------------------------------------------------------------- 1 | version: '3.7' 2 | 3 | services: 4 | rabbitmq: 5 | image: rabbitmq:{{rabbitmq_version}}-management 6 | restart: always 7 | labels: 8 | - traefik.enable=true 9 | - traefik.http.routers.rabbitmq-{{environment}}-{{domains|first|replace:.:-}}-http.rule=Host(`rabbitmq-{{environment}}-{{domains|first}}`) 10 | - traefik.http.routers.rabbitmq-{{environment}}-{{domains|first|replace:.:-}}-http.entrypoints=http 11 | - traefik.http.services.rabbitmq-{{domains|first|replace:.:-}}-http.loadbalancer.server.port=15672 12 | environment: 13 | RABBITMQ_DEFAULT_USER: '{{rabbitmq_username}}' 14 | RABBITMQ_DEFAULT_PASS: '{{rabbitmq_password}}' 15 | RABBITMQ_DEFAULT_VHOST: '{{rabbitmq_vhost}}' 16 | volumes: 17 | - rabbitmq_{{environment}}_data:/var/lib/mysql 18 | # Health check for service dependencies 19 | healthcheck: 20 | test: ["CMD", "rabbitmqctl", "status"] 21 | interval: 30s 22 | timeout: 10s 23 | retries: 5 24 | 25 | volumes: 26 | rabbitmq_{{environment}}_data: 27 | external: false -------------------------------------------------------------------------------- /templates/vendor/defaultvalue/dockerizer-templates/service/mysql_and_forks/dv_mysql_5_6_and_5_7.yaml: -------------------------------------------------------------------------------- 1 | version: '3.7' 2 | 3 | volumes: 4 | mysql_{{environment}}_data: 5 | external: false 6 | 7 | services: 8 | mysql: 9 | image: mysql:{{mysql_version}} 10 | restart: always 11 | environment: 12 | MYSQL_RANDOM_ROOT_PASSWORD: 1 13 | MYSQL_DATABASE: '{{mysql_database}}' 14 | MYSQL_USER: '{{mysql_user}}' 15 | # 1. https://github.com/photoprism/photoprism/discussions/2094 16 | # `$` (dollar sign) must be escaped as `$$` (two dollar signs) so it doesn't get interpreted as variable 17 | # 2. Escape `'` (single quote) as `\'` (backslash and single quote) for entrypoint script to work as expected 18 | MYSQL_PASSWORD: '{{mysql_random_password}}' 19 | volumes: 20 | - mysql_{{environment}}_data:/var/lib/mysql 21 | # MySQL 5.6, 5.7 > /etc/mysql/my.cnf > !includedir /etc/mysql/mysql.conf.d/ 22 | # This dir includes a configuration file that we must override to change datadir 23 | - './mysql/my.cnf:/etc/mysql/mysql.conf.d/zzz-my.cnf:ro' 24 | - ./mysql_initdb:/docker-entrypoint-initdb.d:ro -------------------------------------------------------------------------------- /Future.md: -------------------------------------------------------------------------------- 1 | Pull templates from the repository. Implement ability do add and remove multiple repositories with templates 2 | 3 | `composition:template:list-all` - filter packages by name or supported package? Delete and use meta only! 4 | `composition:template:meta` - filter packages by name or supported package 5 | 6 | ----- 7 | 8 | @TODO 9 | 10 | 1. Move templates to the Composer packages. 11 | 2. PHP-FPM support and Magento PWA support (or describe how to install it). 12 | 3. Support custom Dockerfiles for services. 13 | 4. Add command for get template meta information: name, supported packages, services, variables, etc. 14 | 5. Support Magento EE, B2B, Cloud. 15 | 6. Fix issue displaying full dockerization or Magento setup command. 16 | 7. Rename ProcessibleFile to ProcessableFile 17 | 8. Get command descriptions and short descriptions to generate documentation to keep this information fully consistent and synchronized with the code. 18 | 9. Create command option and argument registry OR extract all of them into the OptionDefinitionInterface/CommandArgumentInterface to guarantee consistent descriptions and documentation. 19 | 10. Generate random Magento admin password. -------------------------------------------------------------------------------- /templates/vendor/defaultvalue/dockerizer-templates/service/php/apache/virtual-host.conf: -------------------------------------------------------------------------------- 1 | 2 | ServerName {{domains|first}} 3 | ServerAlias {{domains}} 4 | DocumentRoot /var/www/html/{{web_root}} 5 | ServerAdmin admin@example.com 6 | UseCanonicalName Off 7 | ErrorLog /var/www/html/var/log/apache_error.log 8 | 9 | AllowOverride All 10 | Require all granted 11 | 12 | 13 | 14 | 15 | ServerName {{domains|first}} 16 | ServerAlias {{domains}} 17 | DocumentRoot /var/www/html/{{web_root}} 18 | ServerAdmin admin@example.com 19 | UseCanonicalName Off 20 | ErrorLog /var/www/html/var/log/apache_error.log 21 | 22 | AllowOverride All 23 | Require all granted 24 | 25 | 26 | SSLEngine on 27 | SSLCertificateFile /certs/{{domains|first}}-{{environment}}.pem 28 | SSLCertificateKeyFile /certs/{{domains|first}}-{{environment}}-key.pem 29 | SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown 30 | 31 | -------------------------------------------------------------------------------- /templates/vendor/defaultvalue/dockerizer-templates/service/mysql_and_forks/dv_bitnami_mariadb.yaml: -------------------------------------------------------------------------------- 1 | version: '3.7' 2 | 3 | volumes: 4 | bitnami_mariadb_{{environment}}_data: 5 | external: false 6 | 7 | services: 8 | mysql: 9 | image: bitnami/mariadb:{{mariadb_version}} 10 | restart: always 11 | environment: 12 | MARIADB_ROOT_PASSWORD: '{{mysql_root_random_password}}' 13 | MARIADB_DATABASE: '{{mysql_database}}' 14 | MARIADB_USER: '{{mysql_user}}' 15 | # 1. https://github.com/photoprism/photoprism/discussions/2094 16 | # `$` (dollar sign) must be escaped as `$$` (two dollar signs) so it doesn't get interpreted as variable 17 | # 2. Escape `'` (single quote) as `''` (two single quotes) for entrypoint script to work as expected 18 | MARIADB_PASSWORD: '{{mysql_random_password}}' 19 | volumes: 20 | # Bitnami's images do not create a data volume in their entrypoint scripts! Volume is required to save data. 21 | # Thus, there is also no need to set `datadir` for Bitnami images to commit DB data 22 | - bitnami_mariadb_{{environment}}_data:/bitnami/mariadb 23 | - './mysql/my.cnf:/opt/bitnami/mariadb/conf/my_custom.cnf:ro' 24 | - ./mysql_initdb:/docker-entrypoint-initdb.d:ro -------------------------------------------------------------------------------- /src/Console/CommandOption/OptionDefinitionInterface.php: -------------------------------------------------------------------------------- 1 | $value) { 21 | if (is_array($value) && isset($merged[$key]) && is_array($merged[$key])) { 22 | if (array_keys($value) === range(0, count($value) - 1)) { 23 | // Numeric-indexed array: merge 24 | $merged[$key] = array_merge($merged[$key], $value); 25 | } else { 26 | // Associative array: recursive replace/merge 27 | $merged[$key] = self::arrayMergeReplaceRecursive($merged[$key], $value); 28 | } 29 | } else { 30 | // Replace the value 31 | $merged[$key] = $value; 32 | } 33 | } 34 | } 35 | 36 | return $merged; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/Console/CommandOption/ValidatableOptionInterface.php: -------------------------------------------------------------------------------- 1 | setValidator()` because options may have complex behavior: 18 | * - Automatically populate some values. For example, automatically select a single value 19 | * for a group of required services in RequiredServices 20 | * - Skip validation of optional services, allowing to have empty list of services 21 | */ 22 | interface ValidatableOptionInterface 23 | { 24 | /** 25 | * Validate entered or pre-defined value (user may pass invalid value via input) 26 | * 27 | * @param null|string|int $value 28 | * @return mixed 29 | * @throws OptionValidationException 30 | */ 31 | public function validate(mixed $value): mixed; 32 | } 33 | -------------------------------------------------------------------------------- /src/Docker/ContainerizedService/ContainerStateException.php: -------------------------------------------------------------------------------- 1 | container->get($dto); 34 | 35 | if (!($newInstance instanceof DataTransferObjectInterface)) { 36 | throw new \DomainException( 37 | "Object of class $dto does not instantiate DataTransferObjectInterface! Use Singletons for it instead!" 38 | ); 39 | } 40 | 41 | return $newInstance; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/Console/CommandOption/OptionDefinition/Exec.php: -------------------------------------------------------------------------------- 1 | mustRun( 28 | 'wget -q -O - http://localhost:9200', // no curl, but wget is installed 29 | Shell::EXECUTION_TIMEOUT_SHORT, 30 | false 31 | ); 32 | } catch (ProcessFailedException) { 33 | $process = $this->mustRun( 34 | 'curl -XGET http://localhost:9200', // try curl if failed 35 | Shell::EXECUTION_TIMEOUT_SHORT, 36 | false 37 | ); 38 | } 39 | 40 | return json_decode(trim($process->getOutput()), true, 512, JSON_THROW_ON_ERROR); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/Console/CommandOption/OptionDefinition/Force.php: -------------------------------------------------------------------------------- 1 | =2.4.1 <2.4.2' 5 | magento/project-enterprise-edition: '>=2.4.1 <2.4.2' 6 | magento/product-community-edition: '>=2.4.1 <2.4.2' 7 | magento/product-enterprise-edition: '>=2.4.1 <2.4.2' 8 | parameters: 9 | environment: 'prod' 10 | mysql_root_random_password: '' 11 | mysql_database: magento_db 12 | mysql_user: magento_user 13 | mysql_random_password: '' 14 | composition: 15 | required: 16 | apache: 17 | php_7_4_apache: 18 | service: dv_php_apache 19 | dev_tools: 20 | - php_apache_development_image 21 | - mailhog 22 | parameters: 23 | composer_version: 1 24 | php_version: '7.4.33' 25 | web_root: 'pub/' 26 | database: 27 | mysql_8_0_persistent: 28 | service: dv_mysql_8_0 29 | dev_tools: phpmyadmin 30 | parameters: 31 | mysql_version: '8.0.28' 32 | mariadb_10_4_persistent: 33 | service: dv_mariadb_10_2_and_above 34 | dev_tools: phpmyadmin 35 | parameters: 36 | mariadb_version: '10.4' 37 | elasticsearch: 38 | elasticsearch_7_7_1_persistent: 39 | service: dv_elasticsearch 40 | parameters: 41 | elasticsearch_version: '7.7.1' 42 | 43 | optional: 44 | redis: 45 | redis_5_0: 46 | service: dv_redis 47 | parameters: 48 | redis_version: '5.0' -------------------------------------------------------------------------------- /templates/vendor/defaultvalue/dockerizer-templates/composition/magento/magento_2.4.2_apache.yaml: -------------------------------------------------------------------------------- 1 | app: 2 | description: Magento 2.4.2 3 | supported_packages: 4 | magento/project-community-edition: '>=2.4.2 <2.4.3' 5 | magento/project-enterprise-edition: '>=2.4.2 <2.4.3' 6 | magento/product-community-edition: '>=2.4.2 <2.4.3' 7 | magento/product-enterprise-edition: '>=2.4.2 <2.4.3' 8 | parameters: 9 | environment: 'prod' 10 | mysql_root_random_password: '' 11 | mysql_database: magento_db 12 | mysql_user: magento_user 13 | mysql_random_password: '' 14 | composition: 15 | required: 16 | apache: 17 | php_7_4_apache: 18 | service: dv_php_apache 19 | dev_tools: 20 | - php_apache_development_image 21 | - mailhog 22 | parameters: 23 | composer_version: 1 24 | php_version: '7.4.33' 25 | web_root: 'pub/' 26 | database: 27 | mysql_8_0_persistent: 28 | service: dv_mysql_8_0 29 | dev_tools: phpmyadmin 30 | parameters: 31 | mysql_version: '8.0.28' 32 | mariadb_10_4_persistent: 33 | service: dv_mariadb_10_2_and_above 34 | dev_tools: phpmyadmin 35 | parameters: 36 | mariadb_version: '10.4' 37 | elasticsearch: 38 | elasticsearch_7_9_3_persistent: 39 | service: dv_elasticsearch 40 | parameters: 41 | elasticsearch_version: '7.9.3' 42 | 43 | optional: 44 | redis: 45 | redis_6_0: 46 | service: dv_redis 47 | parameters: 48 | redis_version: '6.0' -------------------------------------------------------------------------------- /templates/vendor/defaultvalue/dockerizer-templates/composition/magento/magento_2.4.3-p2_apache.yaml: -------------------------------------------------------------------------------- 1 | app: 2 | description: Magento 2.4.3-p2 3 | supported_packages: 4 | magento/project-community-edition: '>=2.4.3-p2 <2.4.4' 5 | magento/project-enterprise-edition: '>=2.4.3-p2 <2.4.4' 6 | magento/product-community-edition: '>=2.4.3-p2 <2.4.4' 7 | magento/product-enterprise-edition: '>=2.4.3-p2 <2.4.4' 8 | parameters: 9 | environment: 'prod' 10 | mysql_root_random_password: '' 11 | mysql_database: magento_db 12 | mysql_user: magento_user 13 | mysql_random_password: '' 14 | composition: 15 | required: 16 | apache: 17 | php_7_4_apache: 18 | service: dv_php_apache 19 | dev_tools: 20 | - php_apache_development_image 21 | - mailhog 22 | parameters: 23 | composer_version: 1 24 | php_version: '7.4.33' 25 | web_root: 'pub/' 26 | database: 27 | mysql_8_0_persistent: 28 | service: dv_mysql_8_0 29 | dev_tools: phpmyadmin 30 | parameters: 31 | mysql_version: '8.0.28' 32 | mariadb_10_4_persistent: 33 | service: dv_mariadb_10_2_and_above 34 | dev_tools: phpmyadmin 35 | parameters: 36 | mariadb_version: '10.4' 37 | elasticsearch: 38 | elasticsearch_7_16_3_persistent: 39 | service: dv_elasticsearch 40 | parameters: 41 | elasticsearch_version: '7.16.3' 42 | 43 | optional: 44 | redis: 45 | redis_6_0: 46 | service: dv_redis 47 | parameters: 48 | redis_version: '6.0' -------------------------------------------------------------------------------- /src/Docker/ContainerizedService/Mysql/Metadata/MetadataKeys.php: -------------------------------------------------------------------------------- 1 | 36 | */ 37 | public static function cases(): array 38 | { 39 | return (new \ReflectionClass(self::class))->getConstants(); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /templates/vendor/defaultvalue/dockerizer-templates/composition/magento/magento_2.4.3_2.4.3-p1_apache.yaml: -------------------------------------------------------------------------------- 1 | app: 2 | description: Magento 2.4.3 - 2.4.3-p1 3 | supported_packages: 4 | magento/project-community-edition: '>=2.4.3 <2.4.3-p2' 5 | magento/project-enterprise-edition: '>=2.4.3 <2.4.3-p2' 6 | magento/product-community-edition: '>=2.4.3 <2.4.3-p2' 7 | magento/product-enterprise-edition: '>=2.4.3 <2.4.3-p2' 8 | parameters: 9 | environment: 'prod' 10 | mysql_root_random_password: '' 11 | mysql_database: magento_db 12 | mysql_user: magento_user 13 | mysql_random_password: '' 14 | composition: 15 | required: 16 | apache: 17 | php_7_4_apache: 18 | service: dv_php_apache 19 | dev_tools: 20 | - php_apache_development_image 21 | - mailhog 22 | parameters: 23 | composer_version: 1 24 | php_version: '7.4.33' 25 | web_root: 'pub/' 26 | database: 27 | mysql_8_0_persistent: 28 | service: dv_mysql_8_0 29 | dev_tools: phpmyadmin 30 | parameters: 31 | mysql_version: '8.0.28' 32 | mariadb_10_4_persistent: 33 | service: dv_mariadb_10_2_and_above 34 | dev_tools: phpmyadmin 35 | parameters: 36 | mariadb_version: '10.4' 37 | elasticsearch: 38 | elasticsearch_7_10_1_persistent: 39 | service: dv_elasticsearch 40 | parameters: 41 | elasticsearch_version: '7.10.1' 42 | 43 | optional: 44 | redis: 45 | redis_6_0: 46 | service: dv_redis 47 | parameters: 48 | redis_version: '6.0' -------------------------------------------------------------------------------- /src/Filesystem/ProcessibleFile/AbstractFile.php: -------------------------------------------------------------------------------- 1 | fileInfo = $fileInfo; 35 | $this->code = $fileInfo->getFilenameWithoutExtension(); 36 | } 37 | 38 | /** 39 | * @return string 40 | */ 41 | public function getCode(): string 42 | { 43 | return $this->code; 44 | } 45 | 46 | /** 47 | * Get SplFileInfo object. For internal use only. Any metadata must be provided via individual public methods 48 | * 49 | * @return SplFileInfo 50 | */ 51 | protected function getFileInfo(): SplFileInfo 52 | { 53 | return $this->fileInfo; 54 | } 55 | 56 | /** 57 | * @param array $data 58 | * @return void 59 | * @throws \Exception 60 | */ 61 | abstract protected function validate(array $data): void; 62 | } 63 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "defaultvalue/dockerizer_for_php", 3 | "description": "Docker-based development for PHP projects with transparent Docker configurations.", 4 | "version": "3.3.2", 5 | "type": "project", 6 | "authors": [{ 7 | "name": "Maksym Zaporozhets", 8 | "email": "maksimzaporozhets@gmail.com", 9 | "homepage": "https://www.linkedin.com/in/maksym-zaporozhets-78890789/", 10 | "role": "VP of Technology" 11 | }], 12 | "homepage": "https://github.com/DefaultValue/dockerizer_for_php", 13 | "readme": "https://github.com/DefaultValue/dockerizer_for_php/wiki", 14 | "require": { 15 | "php": "~8.0.2|~8.1.0|~8.2.0|~8.3.0", 16 | "ext-curl": "*", 17 | "ext-json": "*", 18 | "ext-pcntl": "*", 19 | "ext-posix": "*", 20 | "ext-simplexml": "*", 21 | "ext-fileinfo": "*", 22 | "ext-zip": "*", 23 | "symfony/config": "^6.0", 24 | "symfony/console": "^6.0", 25 | "symfony/dotenv": "^6.0", 26 | "symfony/yaml": "^6.0", 27 | "symfony/dependency-injection": "^6.0", 28 | "symfony/finder": "^6.0", 29 | "symfony/filesystem": "^6.0", 30 | "symfony/process": "^6.0", 31 | "composer/semver": "^3.2", 32 | "symfony/http-client": "^6.0", 33 | "monolog/monolog": "^2.7", 34 | "aws/aws-sdk-php": "^3.253", 35 | "yosymfony/toml": "^1.0" 36 | }, 37 | "require-dev": { 38 | "roave/security-advisories": "dev-latest", 39 | "squizlabs/php_codesniffer": "3.*", 40 | "phpstan/phpstan": "^1.9" 41 | }, 42 | "autoload": { 43 | "psr-4": { 44 | "DefaultValue\\Dockerizer\\": "src/" 45 | } 46 | }, 47 | "minimum-stability": "stable" 48 | } 49 | -------------------------------------------------------------------------------- /templates/vendor/defaultvalue/dockerizer-templates/composition/magento/magento_2.3.6_apache.yaml: -------------------------------------------------------------------------------- 1 | app: 2 | description: Magento 2.3.6 3 | supported_packages: # get package info from composer.json to validate that template is applied to the correct app version 4 | # Use composer semantic versioning https://getcomposer.org/doc/articles/versions.md 5 | magento/project-community-edition: '>=2.3.6 <2.3.7' 6 | magento/project-enterprise-edition: '>=2.3.6 <2.3.7' 7 | magento/product-community-edition: '>=2.3.6 <2.3.7' 8 | magento/product-enterprise-edition: '>=2.3.6 <2.3.7' 9 | parameters: 10 | environment: 'prod' 11 | mysql_root_random_password: '' 12 | mysql_database: magento_db 13 | mysql_user: magento_user 14 | mysql_random_password: '' 15 | composition: 16 | required: 17 | apache: 18 | php_7_3_apache: 19 | service: dv_php_apache 20 | dev_tools: 21 | - php_apache_development_image 22 | - mailhog 23 | parameters: 24 | composer_version: 1 25 | php_version: '7.3.33' 26 | web_root: 'pub/' 27 | database: 28 | mysql_5_7_persistent: 29 | service: dv_mysql_5_6_and_5_7 30 | dev_tools: phpmyadmin 31 | parameters: 32 | mysql_version: '5.7' 33 | mariadb_10_2_persistent: 34 | service: dv_mariadb_10_2_and_above 35 | dev_tools: phpmyadmin 36 | parameters: 37 | mariadb_version: '10.2' 38 | 39 | optional: 40 | redis: 41 | redis_5_0: 42 | service: dv_redis 43 | parameters: 44 | redis_version: '5.0' 45 | elasticsearch: 46 | elasticsearch_7_7_1_persistent: 47 | service: dv_elasticsearch 48 | parameters: 49 | elasticsearch_version: '7.7.1' -------------------------------------------------------------------------------- /templates/vendor/defaultvalue/dockerizer-templates/composition/magento/magento_2.3.7-p3_apache.yaml: -------------------------------------------------------------------------------- 1 | app: 2 | description: Magento 2.3.7-p3 3 | supported_packages: # get package info from composer.json to validate that template is applied to the correct app version 4 | # Use composer semantic versioning https://getcomposer.org/doc/articles/versions.md 5 | magento/project-community-edition: '>=2.3.7-p3 <2.4.0' 6 | magento/project-enterprise-edition: '>=2.3.7-p3 <2.4.0' 7 | magento/product-community-edition: '>=2.3.7-p3 <2.4.0' 8 | magento/product-enterprise-edition: '>=2.3.7-p3 <2.4.0' 9 | parameters: 10 | environment: 'prod' 11 | mysql_root_random_password: '' 12 | mysql_database: magento_db 13 | mysql_user: magento_user 14 | mysql_random_password: '' 15 | composition: 16 | required: 17 | apache: 18 | php_7_4_apache: 19 | service: dv_php_apache 20 | dev_tools: 21 | - php_apache_development_image 22 | - mailhog 23 | parameters: 24 | composer_version: 1 25 | php_version: '7.4.33' 26 | web_root: 'pub/' 27 | database: 28 | mysql_5_7_persistent: 29 | service: dv_mysql_5_6_and_5_7 30 | dev_tools: phpmyadmin 31 | parameters: 32 | mysql_version: '5.7' 33 | mariadb_10_3_persistent: 34 | service: dv_mariadb_10_2_and_above 35 | dev_tools: phpmyadmin 36 | parameters: 37 | mariadb_version: '10.3' 38 | 39 | optional: 40 | redis: 41 | redis_6_0: 42 | service: dv_redis 43 | parameters: 44 | redis_version: '6.0' 45 | elasticsearch: 46 | elasticsearch_7_16_3_persistent: 47 | service: dv_elasticsearch 48 | parameters: 49 | elasticsearch_version: '7.16.3' -------------------------------------------------------------------------------- /templates/vendor/defaultvalue/dockerizer-templates/composition/magento/magento_2.3.7_2.3.7-p2_apache.yaml: -------------------------------------------------------------------------------- 1 | app: 2 | description: Magento 2.3.7 - 2.3.7-p2 3 | supported_packages: # get package info from composer.json to validate that template is applied to the correct app version 4 | # Use composer semantic versioning https://getcomposer.org/doc/articles/versions.md 5 | magento/project-community-edition: '>=2.3.7 <2.3.7-p3' 6 | magento/project-enterprise-edition: '>=2.3.7 <2.3.7-p3' 7 | magento/product-community-edition: '>=2.3.7 <2.3.7-p3' 8 | magento/product-enterprise-edition: '>=2.3.7 <2.3.7-p3' 9 | parameters: 10 | environment: 'prod' 11 | mysql_root_random_password: '' 12 | mysql_database: magento_db 13 | mysql_user: magento_user 14 | mysql_random_password: '' 15 | composition: 16 | required: 17 | apache: 18 | php_7_4_apache: 19 | service: dv_php_apache 20 | dev_tools: 21 | - php_apache_development_image 22 | - mailhog 23 | parameters: 24 | composer_version: 1 25 | php_version: '7.4.33' 26 | web_root: 'pub/' 27 | database: 28 | mysql_5_7_persistent: 29 | service: dv_mysql_5_6_and_5_7 30 | dev_tools: phpmyadmin 31 | parameters: 32 | mysql_version: '5.7' 33 | mariadb_10_3_persistent: 34 | service: dv_mariadb_10_2_and_above 35 | dev_tools: phpmyadmin 36 | parameters: 37 | mariadb_version: '10.3' 38 | 39 | optional: 40 | redis: 41 | redis_6_0: 42 | service: dv_redis 43 | parameters: 44 | redis_version: '6.0' 45 | elasticsearch: 46 | elasticsearch_7_9_3_persistent: 47 | service: dv_elasticsearch 48 | parameters: 49 | elasticsearch_version: '7.9.3' -------------------------------------------------------------------------------- /templates/vendor/defaultvalue/dockerizer-templates/composition/magento/magento_2.4.4_apache_p8.yaml: -------------------------------------------------------------------------------- 1 | app: 2 | description: Magento 2.4.4-p8 (Apache) 3 | supported_packages: 4 | magento/project-community-edition: '>=2.4.4-p8 <2.4.5' 5 | magento/project-enterprise-edition: '>=2.4.4-p8 <2.4.5' 6 | magento/product-community-edition: '>=2.4.4-p8 <2.4.5' 7 | magento/product-enterprise-edition: '>=2.4.4-p8 <2.4.5' 8 | parameters: 9 | environment: 'prod' 10 | mysql_root_random_password: '' 11 | mysql_database: magento_db 12 | mysql_user: magento_user 13 | mysql_random_password: '' 14 | composition: 15 | required: 16 | apache: 17 | php_8_1_apache: 18 | service: dv_php_apache 19 | dev_tools: 20 | - php_apache_development_image 21 | - mailhog 22 | parameters: 23 | composer_version: 2 24 | php_version: '8.1.27' 25 | web_root: 'pub/' 26 | php_7_4_apache: 27 | service: dv_php_apache 28 | dev_tools: 29 | - php_apache_development_image 30 | - mailhog 31 | parameters: 32 | composer_version: 2 33 | php_version: '7.4.33' 34 | web_root: 'pub/' 35 | database: 36 | mysql_8_0_persistent: 37 | service: dv_mysql_8_0 38 | dev_tools: phpmyadmin 39 | parameters: 40 | mysql_version: '8.0.28' 41 | mariadb_10_4_persistent: 42 | service: dv_mariadb_10_2_and_above 43 | dev_tools: phpmyadmin 44 | parameters: 45 | mariadb_version: '10.4' 46 | elasticsearch: 47 | elasticsearch_7_17_20_persistent: 48 | service: dv_elasticsearch 49 | parameters: 50 | elasticsearch_version: '7.17.20' 51 | 52 | optional: 53 | redis: 54 | redis_7_0: 55 | service: dv_redis 56 | parameters: 57 | redis_version: '7.0' -------------------------------------------------------------------------------- /templates/vendor/defaultvalue/dockerizer-templates/composition/magento/magento_2.4.5_apache_p0_p6.yaml: -------------------------------------------------------------------------------- 1 | app: 2 | description: Magento 2.4.5 - 2.4.5-p6 (Apache) 3 | supported_packages: 4 | magento/project-community-edition: '>=2.4.5 <2.4.6' 5 | magento/project-enterprise-edition: '>=2.4.5 <2.4.6' 6 | magento/product-community-edition: '>=2.4.5 <2.4.6' 7 | magento/product-enterprise-edition: '>=2.4.5 <2.4.6' 8 | parameters: 9 | environment: 'prod' 10 | mysql_root_random_password: '' 11 | mysql_database: magento_db 12 | mysql_user: magento_user 13 | mysql_random_password: '' 14 | composition: 15 | required: 16 | apache: 17 | php_8_1_apache: 18 | service: dv_php_apache 19 | dev_tools: 20 | - php_apache_development_image 21 | - mailhog 22 | parameters: 23 | composer_version: 2 24 | php_version: '8.1.27' 25 | web_root: 'pub/' 26 | php_7_4_apache: 27 | service: dv_php_apache 28 | dev_tools: 29 | - php_apache_development_image 30 | - mailhog 31 | parameters: 32 | composer_version: 2 33 | php_version: '7.4.33' 34 | web_root: 'pub/' 35 | database: 36 | mysql_8_0_persistent: 37 | service: dv_mysql_8_0 38 | dev_tools: phpmyadmin 39 | parameters: 40 | mysql_version: '8.0.28' 41 | mariadb_10_4_persistent: 42 | service: dv_mariadb_10_2_and_above 43 | dev_tools: phpmyadmin 44 | parameters: 45 | mariadb_version: '10.4' 46 | elasticsearch: 47 | elasticsearch_7_17_20_persistent: 48 | service: dv_elasticsearch 49 | parameters: 50 | elasticsearch_version: '7.17.20' 51 | 52 | optional: 53 | redis: 54 | redis_6_2: 55 | service: dv_redis 56 | parameters: 57 | redis_version: '6.2' -------------------------------------------------------------------------------- /templates/vendor/defaultvalue/dockerizer-templates/composition/magento/magento_2.4.5_apache_p7.yaml: -------------------------------------------------------------------------------- 1 | app: 2 | description: Magento 2.4.5-p7 (Apache) 3 | supported_packages: 4 | magento/project-community-edition: '>=2.4.5-p7 <2.4.6' 5 | magento/project-enterprise-edition: '>=2.4.5-p7 <2.4.6' 6 | magento/product-community-edition: '>=2.4.5-p7 <2.4.6' 7 | magento/product-enterprise-edition: '>=2.4.5-p7 <2.4.6' 8 | parameters: 9 | environment: 'prod' 10 | mysql_root_random_password: '' 11 | mysql_database: magento_db 12 | mysql_user: magento_user 13 | mysql_random_password: '' 14 | composition: 15 | required: 16 | apache: 17 | php_8_1_apache: 18 | service: dv_php_apache 19 | dev_tools: 20 | - php_apache_development_image 21 | - mailhog 22 | parameters: 23 | composer_version: 2 24 | php_version: '8.1.27' 25 | web_root: 'pub/' 26 | php_7_4_apache: 27 | service: dv_php_apache 28 | dev_tools: 29 | - php_apache_development_image 30 | - mailhog 31 | parameters: 32 | composer_version: 2 33 | php_version: '7.4.33' 34 | web_root: 'pub/' 35 | database: 36 | mysql_8_0_persistent: 37 | service: dv_mysql_8_0 38 | dev_tools: phpmyadmin 39 | parameters: 40 | mysql_version: '8.0.28' 41 | mariadb_10_4_persistent: 42 | service: dv_mariadb_10_2_and_above 43 | dev_tools: phpmyadmin 44 | parameters: 45 | mariadb_version: '10.4' 46 | elasticsearch: 47 | elasticsearch_7_17_20_persistent: 48 | service: dv_elasticsearch 49 | parameters: 50 | elasticsearch_version: '7.17.20' 51 | 52 | optional: 53 | redis: 54 | redis_7_0: 55 | service: dv_redis 56 | parameters: 57 | redis_version: '7.0' -------------------------------------------------------------------------------- /templates/vendor/defaultvalue/dockerizer-templates/service/nginx/nginx_proxy_for_varnish/virtual-host.conf: -------------------------------------------------------------------------------- 1 | upstream varnish-cache-upstream { 2 | server varnish-cache:{{varnish_port}}; 3 | } 4 | 5 | server { 6 | listen 80; 7 | listen [::]:80; 8 | server_name {{domains}}; 9 | rewrite ^ https://$server_name$request_uri? permanent; 10 | } 11 | 12 | server { 13 | server_name {{domains}}; 14 | listen 443 ssl http2; 15 | listen [::]:443 ssl http2; 16 | 17 | ssl_session_timeout 1d; 18 | ssl_session_cache shared:MozSSL:10m; 19 | ssl_session_tickets off; 20 | ssl_protocols TLSv1.2 TLSv1.3; 21 | ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384; 22 | ssl_prefer_server_ciphers off; 23 | # HSTS (ngx_http_headers_module is required) (63072000 seconds) 24 | add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload" always; 25 | # OCSP stapling 26 | ssl_stapling on; 27 | ssl_stapling_verify on; 28 | ssl_certificate /certs/{{domains|first}}-{{environment}}.pem; 29 | ssl_certificate_key /certs/{{domains|first}}-{{environment}}-key.pem; 30 | 31 | location / { 32 | proxy_pass http://varnish-cache-upstream; 33 | proxy_set_header Host $http_host; 34 | proxy_set_header X-Forwarded-Host $http_host; 35 | proxy_set_header X-Real-IP $remote_addr; 36 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 37 | proxy_set_header X-Forwarded-Proto https; 38 | proxy_set_header X-Forwarded-Port 443; 39 | proxy_buffer_size 128k; 40 | proxy_buffers 4 256k; 41 | proxy_busy_buffers_size 256k; 42 | fastcgi_buffer_size 32k; 43 | fastcgi_buffers 4 32k; 44 | } 45 | } -------------------------------------------------------------------------------- /templates/vendor/defaultvalue/dockerizer-templates/composition/magento/magento_2.4.4_apache_p3_p7.yaml: -------------------------------------------------------------------------------- 1 | app: 2 | description: Magento 2.4.4-p3 - 2.4.4-p7 (Apache) 3 | supported_packages: 4 | magento/project-community-edition: '>=2.4.4-p3 <2.4.4-p8' 5 | magento/project-enterprise-edition: '>=2.4.4-p3 <2.4.4-p8' 6 | magento/product-community-edition: '>=2.4.4-p3 <2.4.4-p8' 7 | magento/product-enterprise-edition: '>=2.4.4-p3 <2.4.4-p8' 8 | parameters: 9 | environment: 'prod' 10 | mysql_root_random_password: '' 11 | mysql_database: magento_db 12 | mysql_user: magento_user 13 | mysql_random_password: '' 14 | composition: 15 | required: 16 | apache: 17 | php_8_1_apache: 18 | service: dv_php_apache 19 | dev_tools: 20 | - php_apache_development_image 21 | - mailhog 22 | parameters: 23 | composer_version: 2 24 | php_version: '8.1.27' 25 | web_root: 'pub/' 26 | php_7_4_apache: 27 | service: dv_php_apache 28 | dev_tools: 29 | - php_apache_development_image 30 | - mailhog 31 | parameters: 32 | composer_version: 2 33 | php_version: '7.4.33' 34 | web_root: 'pub/' 35 | database: 36 | mysql_8_0_persistent: 37 | service: dv_mysql_8_0 38 | dev_tools: phpmyadmin 39 | parameters: 40 | mysql_version: '8.0.28' 41 | mariadb_10_4_persistent: 42 | service: dv_mariadb_10_2_and_above 43 | dev_tools: phpmyadmin 44 | parameters: 45 | mariadb_version: '10.4' 46 | elasticsearch: 47 | elasticsearch_7_17_20_persistent: 48 | service: dv_elasticsearch 49 | parameters: 50 | elasticsearch_version: '7.17.20' 51 | 52 | optional: 53 | redis: 54 | redis_6_2: 55 | service: dv_redis 56 | parameters: 57 | redis_version: '6.2' -------------------------------------------------------------------------------- /src/Console/CommandOption/OptionDefinition/Docker/Compose/Service.php: -------------------------------------------------------------------------------- 1 | =2.4.4 <2.4.4-p3' 5 | magento/project-enterprise-edition: '>=2.4.4 <2.4.4-p3' 6 | magento/product-community-edition: '>=2.4.4 <2.4.4-p3' 7 | magento/product-enterprise-edition: '>=2.4.4 <2.4.4-p3' 8 | parameters: 9 | environment: 'prod' 10 | mysql_root_random_password: '' 11 | mysql_database: magento_db 12 | mysql_user: magento_user 13 | mysql_random_password: '' 14 | composition: 15 | required: 16 | apache: 17 | # 2.4.4 is stable with PHP 7.4 and does not work fine with PHP 8.1! Official system reqs are not correct! 18 | php_8_1_apache: 19 | service: dv_php_apache 20 | dev_tools: 21 | - php_apache_development_image 22 | - mailhog 23 | parameters: 24 | composer_version: 2 25 | php_version: '8.1.27' 26 | web_root: 'pub/' 27 | php_7_4_apache: 28 | service: dv_php_apache 29 | dev_tools: 30 | - php_apache_development_image 31 | - mailhog 32 | parameters: 33 | composer_version: 2 34 | php_version: '7.4.33' 35 | web_root: 'pub/' 36 | database: 37 | mysql_8_0_persistent: 38 | service: dv_mysql_8_0 39 | dev_tools: phpmyadmin 40 | parameters: 41 | mysql_version: '8.0.28' 42 | mariadb_10_4_persistent: 43 | service: dv_mariadb_10_2_and_above 44 | dev_tools: phpmyadmin 45 | parameters: 46 | mariadb_version: '10.4' 47 | elasticsearch: 48 | elasticsearch_7_16_3_persistent: 49 | service: dv_elasticsearch 50 | parameters: 51 | elasticsearch_version: '7.16.3' 52 | 53 | optional: 54 | redis: 55 | redis_6_2: 56 | service: dv_redis 57 | parameters: 58 | redis_version: '6.2' -------------------------------------------------------------------------------- /src/Docker/Compose/Composition/PostCompilation/ModifierCollection.php: -------------------------------------------------------------------------------- 1 | postCompilationModifiers as $modifier) { 35 | if (!$modifier instanceof ModifierInterface) { 36 | throw new \RuntimeException(sprintf( 37 | 'Composition modifier of class %s must implement ModifierInterface', 38 | get_class($modifier) 39 | )); 40 | } 41 | 42 | if (isset($sortedModifiers[$modifier->getSortOrder()])) { 43 | throw new \RuntimeException('Two modifiers have thew same sort order!'); 44 | } 45 | 46 | $sortedModifiers[$modifier->getSortOrder()] = $modifier; 47 | } 48 | 49 | /** @var ModifierInterface $modifier */ 50 | foreach ($sortedModifiers as $modifier) { 51 | $modifier->modify($modificationContext); 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/Lib/Security/PasswordGenerator.php: -------------------------------------------------------------------------------- 1 | ,.;?:|'; 29 | 30 | /** 31 | * @param int $length 32 | * @return string 33 | * @throws \Exception 34 | */ 35 | public function generatePassword(int $length = 16): string 36 | { 37 | $charSets = [ 38 | self::CHARACTER_SET_LOWERCASE_LETTERS, 39 | self::CHARACTER_SET_UPPERCASE_LETTERS, 40 | self::CHARACTER_SET_DIGITS, 41 | self::CHARACTER_SET_SPECIAL_CHARS 42 | ]; 43 | 44 | $password = ''; 45 | 46 | foreach ($charSets as $set) { 47 | $password .= $set[random_int(0, count(str_split($set)) - 1)]; 48 | } 49 | 50 | $allChars = str_split(implode($charSets)); 51 | 52 | while (strlen($password) < $length) { 53 | $password .= $allChars[random_int(0, count($allChars) - 1)]; 54 | str_replace('\$', '', $password); 55 | } 56 | 57 | return $password; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/Console/CommandLoggerTrait.php: -------------------------------------------------------------------------------- 1 | logger)) { 35 | throw new \LogicException('Logger already initialized'); 36 | } 37 | 38 | $logFileName = str_replace([':', '-'], '_', $this->getName()) . '.log'; 39 | $internalLogPath = 'var' . DIRECTORY_SEPARATOR . 'log' . DIRECTORY_SEPARATOR . $logFileName; 40 | // Always set a unique name to be able to find logs related to every unique command 41 | // Useful for multithreading and for running the same command in multiple terminals 42 | $handler = new StreamHandler($dockerizerRootDir . $internalLogPath); 43 | $formatter = $handler->getFormatter(); 44 | 45 | if ($formatter instanceof LineFormatter) { 46 | $formatter->allowInlineLineBreaks(); 47 | } 48 | 49 | // Log PID to be able to find logs related to every thread, because Multithread class works with child PIDs 50 | // Add unique ID in case PID is not unique 51 | $this->logger = new Logger( 52 | sprintf('pid-%d.uid-%s', getmypid(), uniqid('', true)), 53 | [$handler] 54 | ); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /templates/vendor/defaultvalue/dockerizer-templates/composition/shopware/shopware_5.5.0-5.5.10_apache.yaml: -------------------------------------------------------------------------------- 1 | app: 2 | description: Shopware 5.5.0 - 5.5.10 (Apache) 3 | parameters: 4 | environment: 'prod' 5 | mysql_root_random_password: '' 6 | mysql_database: shopware_db 7 | mysql_user: shopware_user 8 | mysql_random_password: '' 9 | composition: 10 | required: 11 | apache: 12 | php_7_0_apache: 13 | service: dv_php_apache 14 | dev_tools: 15 | - php_apache_development_image 16 | - mailhog 17 | parameters: 18 | composer_version: 2 19 | php_version: '7.0.33' 20 | web_root: '/' 21 | php_7_1_apache: 22 | service: dv_php_apache 23 | dev_tools: 24 | - php_apache_development_image 25 | - mailhog 26 | parameters: 27 | composer_version: 2 28 | php_version: '7.1.33' 29 | web_root: '/' 30 | php_7_2_apache: 31 | service: dv_php_apache 32 | dev_tools: 33 | - php_apache_development_image 34 | - mailhog 35 | parameters: 36 | composer_version: 2 37 | php_version: '7.2.34' 38 | web_root: '/' 39 | database: 40 | mysql_5_6_persistent: 41 | service: dv_mysql_5_6_and_5_7 42 | dev_tools: phpmyadmin 43 | parameters: 44 | mysql_version: '5.6' 45 | mysql_5_7_persistent: 46 | service: dv_mysql_5_6_and_5_7 47 | dev_tools: phpmyadmin 48 | parameters: 49 | mysql_version: '5.7' 50 | mysql_8_0_persistent: 51 | service: dv_mysql_8_0 52 | dev_tools: phpmyadmin 53 | parameters: 54 | mysql_version: '8.0' 55 | optional: 56 | elasticsearch: 57 | # Shopware 5.5.x documentation elastic search versions 58 | # https://developers.shopware.com/sysadmins-guide/elasticsearch-setup/ 59 | elasticsearch_6_8_23_persistent: 60 | service: dv_elasticsearch 61 | parameters: 62 | elasticsearch_version: '6.8.23' 63 | elasticsearch_7_6_2_persistent: 64 | service: dv_elasticsearch 65 | parameters: 66 | elasticsearch_version: '7.6.2' -------------------------------------------------------------------------------- /templates/vendor/defaultvalue/dockerizer-templates/service/nginx/dv_nginx_proxy_for_varnish.yaml: -------------------------------------------------------------------------------- 1 | version: '3.7' 2 | 3 | ##### 4 | # Check for available PHP versions at https://hub.docker.com/r/defaultvalue/php/tags 5 | ##### 6 | 7 | # ENV VARIABLES: 8 | # - DOCKERIZER_SSL_CERTIFICATES_DIR: `~/misc/certs/` or other folder in the host system where SSL certificates are stored 9 | 10 | services: 11 | nginx-proxy: 12 | # Must be enclosed in double quotes, otherwise YAML is invalid 13 | # Container name is used as a directory name to dump composition files 14 | container_name: '{{domains|first}}-{{environment}}' 15 | image: nginx:latest 16 | restart: always 17 | networks: 18 | default: 19 | aliases: 20 | - '{{domains|explode|to_yaml_array:10|remove_single_quotes_wrapper}}' # Must explicitly declare line indent 21 | labels: 22 | - traefik.enable=true 23 | # HTTP 24 | # Do not auto-redirect to HTTPS to have ability to do this on the web server level 25 | - traefik.http.routers.{{domains|first|replace:.:-}}-http.rule=Host({{domains|explode|enclose:`|implode:,}}) 26 | - traefik.http.routers.{{domains|first|replace:.:-}}-http.entrypoints=http 27 | - traefik.http.routers.{{domains|first|replace:.:-}}-http.service={{domains|first|replace:.:-}}-http 28 | - traefik.http.services.{{domains|first|replace:.:-}}-http.loadbalancer.server.port=80 29 | - traefik.http.services.{{domains|first|replace:.:-}}-http.loadbalancer.server.scheme=http 30 | # HTTPS 31 | - traefik.http.routers.{{domains|first|replace:.:-}}-https.rule=Host({{domains|explode|enclose:`|implode:,}}) 32 | - traefik.http.routers.{{domains|first|replace:.:-}}-https.entrypoints=https 33 | - traefik.http.routers.{{domains|first|replace:.:-}}-https.tls=true 34 | - traefik.http.routers.{{domains|first|replace:.:-}}-https.service={{domains|first|replace:.:-}}-https 35 | - traefik.http.services.{{domains|first|replace:.:-}}-https.loadbalancer.server.port=443 36 | - traefik.http.services.{{domains|first|replace:.:-}}-https.loadbalancer.server.scheme=https 37 | volumes: 38 | - ${DOCKERIZER_SSL_CERTIFICATES_DIR}:/certs 39 | # Replace default virtual host file 40 | - ./nginx_proxy_for_varnish/virtual-host.conf:/etc/nginx/conf.d/default.conf:ro 41 | -------------------------------------------------------------------------------- /src/Console/CommandOption/OptionDefinition/OptionalServices.php: -------------------------------------------------------------------------------- 1 | setValidator([$this, 'validate']); 53 | } 54 | 55 | return $question; 56 | } 57 | 58 | /** 59 | * @inheritDoc 60 | */ 61 | public function validate(mixed $value): array 62 | { 63 | // Empty value is fine for optional services 64 | if ($value === null || $value === '') { 65 | return array_values($this->valueByGroup); 66 | } 67 | 68 | return parent::validate($value); 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /src/Docker/Image.php: -------------------------------------------------------------------------------- 1 | shell->run(['docker', 'images', '--format', '{{.Repository}}:{{.Tag}}']); 36 | $output = $process->getOutput(); 37 | 38 | if (str_contains($output, $image)) { 39 | return; 40 | } 41 | } 42 | 43 | $process = $this->shell->run("docker pull $image", null, [], null, Shell::EXECUTION_TIMEOUT_LONG); 44 | 45 | if ( 46 | PHP_OS_FAMILY === 'Darwin' 47 | && !$process->isSuccessful() 48 | && str_contains($process->getErrorOutput(), 'no matching manifest for') 49 | ) { 50 | $dockerArch = trim($this->shell->run('docker version --format {{.Server.Arch}}')->getOutput()); 51 | 52 | if ($dockerArch === 'arm64') { 53 | $process = $this->shell->run( 54 | "docker pull --platform linux/amd64 $image", 55 | null, 56 | [], 57 | null, 58 | Shell::EXECUTION_TIMEOUT_LONG 59 | ); 60 | } 61 | } 62 | 63 | if ($mustRun && !$process->isSuccessful()) { 64 | throw new ProcessFailedException($process); 65 | } 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /src/Docker/Events.php: -------------------------------------------------------------------------------- 1 | array_merge($carry ?? [], ['--filter'], [$filter]) 38 | ); 39 | 40 | // Start a background process 41 | $this->processes[] = $this->shell->start( 42 | array_merge(self::EVENT_COMMAND, $preparedEventFilters), 43 | null, 44 | [], 45 | null, 46 | Shell::EXECUTION_TIMEOUT_INFINITE, 47 | $callback 48 | ); 49 | } 50 | 51 | /** 52 | * Watch for Docker events and exit on the background process exit or failure 53 | * @TODO: Extract this method to a separate class 54 | * 55 | * @return void 56 | */ 57 | public function watch(): void 58 | { 59 | while (true) { 60 | foreach ($this->processes as $process) { 61 | if (!$process->isRunning()) { 62 | $errorMessage = sprintf( 63 | 'Process "%s" exited with code %d and output: %s', 64 | $process->getCommandLine(), 65 | $process->getExitCode(), 66 | $process->getErrorOutput() 67 | ); 68 | 69 | throw new \RuntimeException($errorMessage); 70 | } 71 | } 72 | 73 | usleep(10); 74 | } 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /templates/vendor/defaultvalue/dockerizer-templates/composition/shopware/shopware_5.6.0-5.6.9_apache.yaml: -------------------------------------------------------------------------------- 1 | app: 2 | description: Shopware 5.6.0 - 5.6.9 (Apache) 3 | parameters: 4 | environment: 'prod' 5 | mysql_root_random_password: '' 6 | mysql_database: shopware_db 7 | mysql_user: shopware_user 8 | mysql_random_password: '' 9 | composition: 10 | required: 11 | apache: 12 | php_7_2_apache: 13 | service: dv_php_apache 14 | dev_tools: 15 | - php_apache_development_image 16 | - mailhog 17 | parameters: 18 | composer_version: 2 19 | php_version: '7.2.34' 20 | web_root: '/' 21 | php_7_3_apache: 22 | service: dv_php_apache 23 | dev_tools: 24 | - php_apache_development_image 25 | - mailhog 26 | parameters: 27 | composer_version: 2 28 | php_version: '7.3.33' 29 | web_root: '/' 30 | php_7_4_apache: 31 | service: dv_php_apache 32 | dev_tools: 33 | - php_apache_development_image 34 | - mailhog 35 | parameters: 36 | composer_version: 2 37 | php_version: '7.4.33' 38 | web_root: '/' 39 | php_8_0_apache: 40 | service: dv_php_apache 41 | dev_tools: 42 | - php_apache_development_image 43 | - mailhog 44 | parameters: 45 | composer_version: 2 46 | php_version: '8.0.30' 47 | web_root: '/' 48 | database: 49 | mysql_5_7_persistent: 50 | service: dv_mysql_5_6_and_5_7 51 | dev_tools: phpmyadmin 52 | parameters: 53 | mysql_version: '5.7' 54 | mysql_8_0_persistent: 55 | service: dv_mysql_8_0 56 | dev_tools: phpmyadmin 57 | parameters: 58 | mysql_version: '8.0' 59 | 60 | optional: 61 | elasticsearch: 62 | # Shopware 5.6.x documentation elastic search versions 63 | # https://developers.shopware.com/sysadmins-guide/elasticsearch-setup/ 64 | elasticsearch_6_8_23_persistent: 65 | service: dv_elasticsearch 66 | parameters: 67 | elasticsearch_version: '6.8.23' 68 | elasticsearch_7_6_2_persistent: 69 | service: dv_elasticsearch 70 | parameters: 71 | elasticsearch_version: '7.6.2' -------------------------------------------------------------------------------- /templates/vendor/defaultvalue/dockerizer-templates/composition/magento/magento_2.4.1_nginx_varnish_apache.yaml: -------------------------------------------------------------------------------- 1 | app: 2 | description: Magento 2.4.1 (Nginx + Varnish + Apache) 3 | supported_packages: 4 | magento/project-community-edition: '>=2.4.1 <2.4.2' 5 | magento/project-enterprise-edition: '>=2.4.1 <2.4.2' 6 | magento/product-community-edition: '>=2.4.1 <2.4.2' 7 | magento/product-enterprise-edition: '>=2.4.1 <2.4.2' 8 | parameters: 9 | environment: 'prod' 10 | mysql_root_random_password: '' 11 | mysql_database: magento_db 12 | mysql_user: magento_user 13 | mysql_random_password: '' 14 | composition: 15 | required: 16 | nginx: 17 | nginx_latest: 18 | service: dv_nginx_proxy_for_varnish 19 | varnish: 20 | varnish_6_2_1: 21 | service: dv_varnish_magento 22 | parameters: 23 | # docker-compose service name goes here 24 | backend_host: php 25 | # Config path: full_page_cache/default/grace_period 26 | grace_period: 300 27 | # Config path: web/secure/offloader_header. Changed to `X-Forwarded-Proto` since Magento 2.1 28 | ssl_offloaded_header: 'X-Forwarded-Proto' 29 | # Use `/pub/health_check.php` in case the web root equals to the project root 30 | health_check: '/health_check.php' 31 | # Actually used for Nginx service 32 | varnish_port: 80 33 | varnish_version: 6.2.1-1 34 | apache: 35 | php_7_4_apache: 36 | service: dv_php_apache_unsecure 37 | dev_tools: 38 | - php_apache_development_image 39 | - mailhog 40 | parameters: 41 | composer_version: 1 42 | php_version: '7.4.33' 43 | web_root: 'pub/' 44 | database: 45 | mysql_8_0_persistent: 46 | service: dv_mysql_8_0 47 | dev_tools: phpmyadmin 48 | parameters: 49 | mysql_version: '8.0.28' 50 | mariadb_10_4_persistent: 51 | service: dv_mariadb_10_2_and_above 52 | dev_tools: phpmyadmin 53 | parameters: 54 | mariadb_version: '10.4' 55 | elasticsearch: 56 | elasticsearch_7_7_1_persistent: 57 | service: dv_elasticsearch 58 | parameters: 59 | elasticsearch_version: '7.7.1' 60 | 61 | optional: 62 | redis: 63 | redis_5_0: 64 | service: dv_redis 65 | parameters: 66 | redis_version: '5.0' -------------------------------------------------------------------------------- /templates/vendor/defaultvalue/dockerizer-templates/composition/magento/magento_2.4.2_nginx_varnish_apache.yaml: -------------------------------------------------------------------------------- 1 | app: 2 | description: Magento 2.4.2 (Nginx + Varnish + Apache) 3 | supported_packages: 4 | magento/project-community-edition: '>=2.4.2 <2.4.3' 5 | magento/project-enterprise-edition: '>=2.4.2 <2.4.3' 6 | magento/product-community-edition: '>=2.4.2 <2.4.3' 7 | magento/product-enterprise-edition: '>=2.4.2 <2.4.3' 8 | parameters: 9 | environment: 'prod' 10 | mysql_root_random_password: '' 11 | mysql_database: magento_db 12 | mysql_user: magento_user 13 | mysql_random_password: '' 14 | composition: 15 | required: 16 | nginx: 17 | nginx_latest: 18 | service: dv_nginx_proxy_for_varnish 19 | varnish: 20 | varnish_6_4_0: 21 | service: dv_varnish_magento 22 | parameters: 23 | # docker-compose service name goes here 24 | backend_host: php 25 | # Config path: full_page_cache/default/grace_period 26 | grace_period: 300 27 | # Config path: web/secure/offloader_header. Changed to `X-Forwarded-Proto` since Magento 2.1 28 | ssl_offloaded_header: 'X-Forwarded-Proto' 29 | # Use `/pub/health_check.php` in case the web root equals to the project root 30 | health_check: '/health_check.php' 31 | # Actually used for Nginx service 32 | varnish_port: 80 33 | varnish_version: 6.4.0-1 34 | apache: 35 | php_7_4_apache: 36 | service: dv_php_apache_unsecure 37 | dev_tools: 38 | - php_apache_development_image 39 | - mailhog 40 | parameters: 41 | composer_version: 1 42 | php_version: '7.4.33' 43 | web_root: 'pub/' 44 | database: 45 | mysql_8_0_persistent: 46 | service: dv_mysql_8_0 47 | dev_tools: phpmyadmin 48 | parameters: 49 | mysql_version: '8.0.28' 50 | mariadb_10_4_persistent: 51 | service: dv_mariadb_10_2_and_above 52 | dev_tools: phpmyadmin 53 | parameters: 54 | mariadb_version: '10.4' 55 | elasticsearch: 56 | elasticsearch_7_9_3_persistent: 57 | service: dv_elasticsearch 58 | parameters: 59 | elasticsearch_version: '7.9.3' 60 | 61 | optional: 62 | redis: 63 | redis_6_0: 64 | service: dv_redis 65 | parameters: 66 | redis_version: '6.0' -------------------------------------------------------------------------------- /src/Docker/Compose/Composition/PostCompilation/Modifier/AbstractSslAwareModifier.php: -------------------------------------------------------------------------------- 1 | getCompositionYaml(), 28 | $modificationContext->getDevToolsYaml(), 29 | ); 30 | 31 | // Find all containers with TLS enabled 32 | foreach ($fullYaml['services'] as $service) { 33 | if (!isset($service['labels'])) { 34 | continue; 35 | } 36 | 37 | $tlsEnabled = false; 38 | $domains = []; 39 | 40 | foreach ($service['labels'] as $label) { 41 | // @TODO: would br great to handle not only Treafik, but other proxies as well 42 | if (str_contains($label, '.tls=true')) { 43 | $tlsEnabled = true; 44 | } 45 | 46 | if (str_contains($label, 'https.rule=Host')) { 47 | $domains = explode(',', rtrim(explode('Host(', $label)[1], ')')); 48 | $domains = array_map(static fn ($value) => trim($value, '`'), $domains); 49 | } 50 | } 51 | 52 | if ($tlsEnabled) { 53 | // We can't handle containers that do not have `container_name` because composition is not running yet 54 | $containersThatRequiteCertificates[$service['container_name']] = $domains; 55 | } 56 | } 57 | 58 | return $containersThatRequiteCertificates; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /templates/vendor/defaultvalue/dockerizer-templates/composition/magento/magento_2.3.6_nginx_varnish_apache.yaml: -------------------------------------------------------------------------------- 1 | app: 2 | description: Magento 2.3.6 (Nginx + Varnish + Apache) 3 | supported_packages: 4 | magento/project-community-edition: '>=2.3.6 <2.3.7' 5 | magento/project-enterprise-edition: '>=2.3.6 <2.3.7' 6 | magento/product-community-edition: '>=2.3.6 <2.3.7' 7 | magento/product-enterprise-edition: '>=2.3.6 <2.3.7' 8 | parameters: 9 | environment: 'prod' 10 | mysql_root_random_password: '' 11 | mysql_database: magento_db 12 | mysql_user: magento_user 13 | mysql_random_password: '' 14 | composition: 15 | required: 16 | nginx: 17 | nginx_latest: 18 | service: dv_nginx_proxy_for_varnish 19 | varnish: 20 | varnish_6_4_0: 21 | service: dv_varnish_magento 22 | parameters: 23 | # docker-compose service name goes here 24 | backend_host: php 25 | # Config path: full_page_cache/default/grace_period 26 | grace_period: 300 27 | # Config path: web/secure/offloader_header. Changed to `X-Forwarded-Proto` since Magento 2.1 28 | ssl_offloaded_header: 'X-Forwarded-Proto' 29 | # Use `/pub/health_check.php` in case the web root equals to the project root 30 | health_check: '/health_check.php' 31 | # Actually used for Nginx service 32 | varnish_port: 80 33 | varnish_version: 6.4.0-1 34 | apache: 35 | php_7_3_apache: 36 | service: dv_php_apache_unsecure 37 | dev_tools: 38 | - php_apache_development_image 39 | - mailhog 40 | parameters: 41 | composer_version: 1 42 | php_version: '7.3.33' 43 | web_root: 'pub/' 44 | database: 45 | mysql_5_7_persistent: 46 | service: dv_mysql_5_6_and_5_7 47 | dev_tools: phpmyadmin 48 | parameters: 49 | mysql_version: '5.7' 50 | mariadb_10_2_persistent: 51 | service: dv_mariadb_10_2_and_above 52 | dev_tools: phpmyadmin 53 | parameters: 54 | mariadb_version: '10.2' 55 | 56 | optional: 57 | redis: 58 | redis_5_0: 59 | service: dv_redis 60 | parameters: 61 | redis_version: '5.0' 62 | elasticsearch: 63 | elasticsearch_7_7_1_persistent: 64 | service: dv_elasticsearch 65 | parameters: 66 | elasticsearch_version: '7.7.1' -------------------------------------------------------------------------------- /templates/vendor/defaultvalue/dockerizer-templates/composition/magento/magento_2.4.3-p2_nginx_varnish_apache.yaml: -------------------------------------------------------------------------------- 1 | app: 2 | description: Magento 2.4.3-p2 (Nginx + Varnish + Apache) 3 | supported_packages: 4 | magento/project-community-edition: '>=2.4.3-p2 <2.4.4' 5 | magento/project-enterprise-edition: '>=2.4.3-p2 <2.4.4' 6 | magento/product-community-edition: '>=2.4.3-p2 <2.4.4' 7 | magento/product-enterprise-edition: '>=2.4.3-p2 <2.4.4' 8 | parameters: 9 | environment: 'prod' 10 | mysql_root_random_password: '' 11 | mysql_database: magento_db 12 | mysql_user: magento_user 13 | mysql_random_password: '' 14 | composition: 15 | required: 16 | nginx: 17 | nginx_latest: 18 | service: dv_nginx_proxy_for_varnish 19 | varnish: 20 | varnish_6_5_1: 21 | service: dv_varnish_magento 22 | parameters: 23 | # docker-compose service name goes here 24 | backend_host: php 25 | # Config path: full_page_cache/default/grace_period 26 | grace_period: 300 27 | # Config path: web/secure/offloader_header. Changed to `X-Forwarded-Proto` since Magento 2.1 28 | ssl_offloaded_header: 'X-Forwarded-Proto' 29 | # Use `/pub/health_check.php` in case the web root equals to the project root 30 | health_check: '/health_check.php' 31 | # Actually used for Nginx service 32 | varnish_port: 80 33 | varnish_version: 6.5.1-1 34 | apache: 35 | php_7_4_apache: 36 | service: dv_php_apache_unsecure 37 | dev_tools: 38 | - php_apache_development_image 39 | - mailhog 40 | parameters: 41 | composer_version: 1 42 | php_version: '7.4.33' 43 | web_root: 'pub/' 44 | database: 45 | mysql_8_0_persistent: 46 | service: dv_mysql_8_0 47 | dev_tools: phpmyadmin 48 | parameters: 49 | mysql_version: '8.0.28' 50 | mariadb_10_4_persistent: 51 | service: dv_mariadb_10_2_and_above 52 | dev_tools: phpmyadmin 53 | parameters: 54 | mariadb_version: '10.4' 55 | elasticsearch: 56 | elasticsearch_7_16_3_persistent: 57 | service: dv_elasticsearch 58 | parameters: 59 | elasticsearch_version: '7.16.3' 60 | 61 | optional: 62 | redis: 63 | redis_6_0: 64 | service: dv_redis 65 | parameters: 66 | redis_version: '6.0' -------------------------------------------------------------------------------- /templates/vendor/defaultvalue/dockerizer-templates/composition/magento/magento_2.3.5_apache.yaml: -------------------------------------------------------------------------------- 1 | app: 2 | description: Magento 2.3.5 3 | supported_packages: # get package info from composer.json to validate that template is applied to the correct app version 4 | # Use composer semantic versioning https://getcomposer.org/doc/articles/versions.md 5 | magento/project-community-edition: '>=2.3.5 <2.3.6' 6 | magento/project-enterprise-edition: '>=2.3.5 <2.3.6' 7 | magento/product-community-edition: '>=2.3.5 <2.3.6' 8 | magento/product-enterprise-edition: '>=2.3.5 <2.3.6' 9 | # Global parameters that are passed to every service 10 | parameters: 11 | environment: 'prod' 12 | mysql_root_random_password: '' 13 | mysql_database: magento_db 14 | mysql_user: magento_user 15 | mysql_random_password: '' 16 | composition: 17 | required: 18 | apache: 19 | php_7_3_apache: 20 | service: dv_php_apache 21 | dev_tools: 22 | - php_apache_development_image 23 | - mailhog 24 | parameters: 25 | composer_version: 1 26 | php_version: '7.3.33' 27 | web_root: 'pub/' 28 | php_7_2_apache: 29 | service: dv_php_apache 30 | dev_tools: 31 | - php_apache_development_image 32 | - mailhog 33 | parameters: 34 | composer_version: 1 35 | php_version: '7.2.34' 36 | web_root: 'pub/' 37 | database: 38 | mysql_5_7_persistent: 39 | service: dv_mysql_5_6_and_5_7 40 | dev_tools: phpmyadmin 41 | parameters: 42 | mysql_version: '5.7' 43 | mysql_5_6_persistent: 44 | service: dv_mysql_5_6_and_5_7 45 | dev_tools: phpmyadmin 46 | parameters: 47 | mysql_version: '5.6' 48 | mariadb_10_2_persistent: 49 | service: dv_mariadb_10_2_and_above 50 | dev_tools: phpmyadmin 51 | parameters: 52 | mariadb_version: '10.2' 53 | mariadb_10_1_persistent: 54 | service: dv_mariadb_10_1 55 | dev_tools: phpmyadmin 56 | parameters: 57 | mariadb_version: '10.1' 58 | 59 | optional: 60 | redis: 61 | redis_5_0: 62 | service: dv_redis 63 | parameters: 64 | redis_version: '5.0' 65 | elasticsearch: 66 | elasticsearch_7_6_2_persistent: 67 | service: dv_elasticsearch 68 | parameters: 69 | elasticsearch_version: '7.6.2' -------------------------------------------------------------------------------- /templates/vendor/defaultvalue/dockerizer-templates/composition/magento/magento_2.3.7-p3_nginx_varnish_apache.yaml: -------------------------------------------------------------------------------- 1 | app: 2 | description: Magento 2.3.7-p3 (Nginx + Varnish + Apache) 3 | supported_packages: 4 | magento/project-community-edition: '>=2.3.7-p3 <2.4.0' 5 | magento/project-enterprise-edition: '>=2.3.7-p3 <2.4.0' 6 | magento/product-community-edition: '>=2.3.7-p3 <2.4.0' 7 | magento/product-enterprise-edition: '>=2.3.7-p3 <2.4.0' 8 | parameters: 9 | environment: 'prod' 10 | mysql_root_random_password: '' 11 | mysql_database: magento_db 12 | mysql_user: magento_user 13 | mysql_random_password: '' 14 | composition: 15 | required: 16 | nginx: 17 | nginx_latest: 18 | service: dv_nginx_proxy_for_varnish 19 | varnish: 20 | varnish_6_5_1: 21 | service: dv_varnish_magento 22 | parameters: 23 | # docker-compose service name goes here 24 | backend_host: php 25 | # Config path: full_page_cache/default/grace_period 26 | grace_period: 300 27 | # Config path: web/secure/offloader_header. Changed to `X-Forwarded-Proto` since Magento 2.1 28 | ssl_offloaded_header: 'X-Forwarded-Proto' 29 | # Use `/pub/health_check.php` in case the web root equals to the project root 30 | health_check: '/health_check.php' 31 | # Actually used for Nginx service 32 | varnish_port: 80 33 | varnish_version: 6.5.1-1 34 | apache: 35 | php_7_4_apache: 36 | service: dv_php_apache_unsecure 37 | dev_tools: 38 | - php_apache_development_image 39 | - mailhog 40 | parameters: 41 | composer_version: 1 42 | php_version: '7.4.33' 43 | web_root: 'pub/' 44 | database: 45 | mysql_5_7_persistent: 46 | service: dv_mysql_5_6_and_5_7 47 | dev_tools: phpmyadmin 48 | parameters: 49 | mysql_version: '5.7' 50 | mariadb_10_3_persistent: 51 | service: dv_mariadb_10_2_and_above 52 | dev_tools: phpmyadmin 53 | parameters: 54 | mariadb_version: '10.3' 55 | 56 | optional: 57 | redis: 58 | redis_6_0: 59 | service: dv_redis 60 | parameters: 61 | redis_version: '6.0' 62 | elasticsearch: 63 | elasticsearch_7_16_3_persistent: 64 | service: dv_elasticsearch 65 | parameters: 66 | elasticsearch_version: '7.16.3' -------------------------------------------------------------------------------- /templates/vendor/defaultvalue/dockerizer-templates/composition/magento/magento_2.4.3_2.4.3-p1_nginx_varnish_apache.yaml: -------------------------------------------------------------------------------- 1 | app: 2 | description: Magento 2.4.3 - 2.4.3-p1 (Nginx + Varnish + Apache) 3 | supported_packages: 4 | magento/project-community-edition: '>=2.4.3 <2.4.3-p2' 5 | magento/project-enterprise-edition: '>=2.4.3 <2.4.3-p2' 6 | magento/product-community-edition: '>=2.4.3 <2.4.3-p2' 7 | magento/product-enterprise-edition: '>=2.4.3 <2.4.3-p2' 8 | parameters: 9 | environment: 'prod' 10 | mysql_root_random_password: '' 11 | mysql_database: magento_db 12 | mysql_user: magento_user 13 | mysql_random_password: '' 14 | composition: 15 | required: 16 | nginx: 17 | nginx_latest: 18 | service: dv_nginx_proxy_for_varnish 19 | varnish: 20 | varnish_6_5_1: 21 | service: dv_varnish_magento 22 | parameters: 23 | # docker-compose service name goes here 24 | backend_host: php 25 | # Config path: full_page_cache/default/grace_period 26 | grace_period: 300 27 | # Config path: web/secure/offloader_header. Changed to `X-Forwarded-Proto` since Magento 2.1 28 | ssl_offloaded_header: 'X-Forwarded-Proto' 29 | # Use `/pub/health_check.php` in case the web root equals to the project root 30 | health_check: '/health_check.php' 31 | # Actually used for Nginx service 32 | varnish_port: 80 33 | varnish_version: 6.5.1-1 34 | apache: 35 | php_7_4_apache: 36 | service: dv_php_apache_unsecure 37 | dev_tools: 38 | - php_apache_development_image 39 | - mailhog 40 | parameters: 41 | composer_version: 1 42 | php_version: '7.4.33' 43 | web_root: 'pub/' 44 | database: 45 | mysql_8_0_persistent: 46 | service: dv_mysql_8_0 47 | dev_tools: phpmyadmin 48 | parameters: 49 | mysql_version: '8.0.28' 50 | mariadb_10_4_persistent: 51 | service: dv_mariadb_10_2_and_above 52 | dev_tools: phpmyadmin 53 | parameters: 54 | mariadb_version: '10.4' 55 | elasticsearch: 56 | elasticsearch_7_10_1_persistent: 57 | service: dv_elasticsearch 58 | parameters: 59 | elasticsearch_version: '7.10.1' 60 | 61 | optional: 62 | redis: 63 | redis_6_0: 64 | service: dv_redis 65 | parameters: 66 | redis_version: '6.0' -------------------------------------------------------------------------------- /templates/vendor/defaultvalue/dockerizer-templates/composition/magento/magento_2.4.7_apache_beta3.yaml: -------------------------------------------------------------------------------- 1 | app: 2 | description: Magento 2.4.7-beta3 (Apache) 3 | # System requirements based on https://experienceleague.adobe.com/docs/commerce-operations/release/notes/magento-open-source/2-4-7.html 4 | supported_packages: 5 | magento/project-community-edition: '>=2.4.7-beta3 <2.4.7' 6 | magento/project-enterprise-edition: '>=2.4.7-beta3 <2.4.7' 7 | magento/product-community-edition: '>=2.4.7-beta3 <2.4.7' 8 | magento/product-enterprise-edition: '>=2.4.7-beta3 <2.4.7' 9 | parameters: 10 | environment: 'prod' 11 | mysql_root_random_password: '' 12 | mysql_database: magento_db 13 | mysql_user: magento_user 14 | mysql_random_password: '' 15 | composition: 16 | required: 17 | apache: 18 | php_8_2_apache: 19 | service: dv_php_apache 20 | dev_tools: 21 | - php_apache_development_image 22 | - mailhog 23 | parameters: 24 | composer_version: 2 25 | php_version: '8.2.18' 26 | web_root: 'pub/' 27 | php_8_1_apache: 28 | service: dv_php_apache 29 | dev_tools: 30 | - php_apache_development_image 31 | - mailhog 32 | parameters: 33 | composer_version: 2 34 | php_version: '8.1.27' 35 | web_root: 'pub/' 36 | database: 37 | mysql_8_0_persistent: 38 | service: dv_mysql_8_0 39 | dev_tools: phpmyadmin 40 | parameters: 41 | mysql_version: '8.0' 42 | mariadb_10_6_persistent: 43 | service: dv_mariadb_10_2_and_above 44 | dev_tools: phpmyadmin 45 | parameters: 46 | mariadb_version: '10.6' 47 | # Does not work with 8.5! Installing Sample data and generating fixtures fail due to MSI issues. 48 | # https://github.com/magento/magento2/issues/36687#issuecomment-1475984941 49 | search_engine: 50 | elasticsearch_7_17_20_persistent: 51 | service: dv_elasticsearch 52 | parameters: 53 | elasticsearch_version: '7.17.20' 54 | opensearch_2_11_1: 55 | service: opensearch 56 | dev_tools: opensearch_dashboards 57 | parameters: 58 | opensearch_version: '2.11.1' 59 | opensearch_dashboards_version: '2.11.1' 60 | 61 | optional: 62 | redis: 63 | redis_7_2: 64 | service: dv_redis 65 | parameters: 66 | redis_version: '7.2' -------------------------------------------------------------------------------- /templates/vendor/defaultvalue/dockerizer-templates/composition/magento/magento_2.3.7_2.3.7-p2_nginx_varnish_apache.yaml: -------------------------------------------------------------------------------- 1 | app: 2 | description: Magento 2.3.7 - 2.3.7-p2 (Nginx + Varnish + Apache) 3 | supported_packages: 4 | magento/project-community-edition: '>=2.3.7 <2.3.7-p3' 5 | magento/project-enterprise-edition: '>=2.3.7 <2.3.7-p3' 6 | magento/product-community-edition: '>=2.3.7 <2.3.7-p3' 7 | magento/product-enterprise-edition: '>=2.3.7 <2.3.7-p3' 8 | parameters: 9 | environment: 'prod' 10 | mysql_root_random_password: '' 11 | mysql_database: magento_db 12 | mysql_user: magento_user 13 | mysql_random_password: '' 14 | composition: 15 | required: 16 | nginx: 17 | nginx_latest: 18 | service: dv_nginx_proxy_for_varnish 19 | varnish: 20 | varnish_6_5_1: 21 | service: dv_varnish_magento 22 | parameters: 23 | # docker-compose service name goes here 24 | backend_host: php 25 | # Config path: full_page_cache/default/grace_period 26 | grace_period: 300 27 | # Config path: web/secure/offloader_header. Changed to `X-Forwarded-Proto` since Magento 2.1 28 | ssl_offloaded_header: 'X-Forwarded-Proto' 29 | # Use `/pub/health_check.php` in case the web root equals to the project root 30 | health_check: '/health_check.php' 31 | # Actually used for Nginx service 32 | varnish_port: 80 33 | varnish_version: 6.5.1-1 34 | apache: 35 | php_7_4_apache: 36 | service: dv_php_apache_unsecure 37 | dev_tools: 38 | - php_apache_development_image 39 | - mailhog 40 | parameters: 41 | composer_version: 1 42 | php_version: '7.4.33' 43 | web_root: 'pub/' 44 | database: 45 | mysql_5_7_persistent: 46 | service: dv_mysql_5_6_and_5_7 47 | dev_tools: phpmyadmin 48 | parameters: 49 | mysql_version: '5.7' 50 | mariadb_10_3_persistent: 51 | service: dv_mariadb_10_2_and_above 52 | dev_tools: phpmyadmin 53 | parameters: 54 | mariadb_version: '10.3' 55 | 56 | optional: 57 | redis: 58 | redis_6_0: 59 | service: dv_redis 60 | parameters: 61 | redis_version: '6.0' 62 | elasticsearch: 63 | elasticsearch_7_9_3_persistent: 64 | service: dv_elasticsearch 65 | parameters: 66 | elasticsearch_version: '7.9.3' -------------------------------------------------------------------------------- /templates/vendor/defaultvalue/dockerizer-templates/composition/magento/magento_2.4.7_apache_beta1_beta2.yaml: -------------------------------------------------------------------------------- 1 | app: 2 | description: Magento 2.4.7-beta1 & 2.4.7-beta2 (Apache) 3 | # System requirements based on https://experienceleague.adobe.com/docs/commerce-operations/release/notes/magento-open-source/2-4-7.html 4 | supported_packages: 5 | magento/project-community-edition: '>=2.4.7-beta1 <2.4.7-beta3' 6 | magento/project-enterprise-edition: '>=2.4.7-beta1 <2.4.7-beta3' 7 | magento/product-community-edition: '>=2.4.7-beta1 <2.4.7-beta3' 8 | magento/product-enterprise-edition: '>=2.4.7-beta1 <2.4.7-beta3' 9 | parameters: 10 | environment: 'prod' 11 | mysql_root_random_password: '' 12 | mysql_database: magento_db 13 | mysql_user: magento_user 14 | mysql_random_password: '' 15 | composition: 16 | required: 17 | apache: 18 | php_8_2_apache: 19 | service: dv_php_apache 20 | dev_tools: 21 | - php_apache_development_image 22 | - mailhog 23 | parameters: 24 | composer_version: 2 25 | php_version: '8.2.18' 26 | web_root: 'pub/' 27 | php_8_1_apache: 28 | service: dv_php_apache 29 | dev_tools: 30 | - php_apache_development_image 31 | - mailhog 32 | parameters: 33 | composer_version: 2 34 | php_version: '8.1.27' 35 | web_root: 'pub/' 36 | database: 37 | mysql_8_0_persistent: 38 | service: dv_mysql_8_0 39 | dev_tools: phpmyadmin 40 | parameters: 41 | mysql_version: '8.0' 42 | mariadb_10_6_persistent: 43 | service: dv_mariadb_10_2_and_above 44 | dev_tools: phpmyadmin 45 | parameters: 46 | mariadb_version: '10.6' 47 | # Does not work with 8.5! Installing Sample data and generating fixtures fail due to MSI issues. 48 | # https://github.com/magento/magento2/issues/36687#issuecomment-1475984941 49 | search_engine: 50 | elasticsearch_7_17_20_persistent: 51 | service: dv_elasticsearch 52 | parameters: 53 | elasticsearch_version: '7.17.20' 54 | opensearch_2_5: 55 | service: magento_opensearch 56 | dev_tools: opensearch_dashboards 57 | parameters: 58 | opensearch_version: '2.5-1.3.5' 59 | opensearch_dashboards_version: '2.5.0' 60 | 61 | optional: 62 | redis: 63 | redis_7_0: 64 | service: dv_redis 65 | parameters: 66 | redis_version: '7.0' -------------------------------------------------------------------------------- /templates/vendor/defaultvalue/dockerizer-templates/service/php/dv_php_apache_8_3.yaml: -------------------------------------------------------------------------------- 1 | version: '3.7' 2 | 3 | ##### 4 | # Check for available PHP versions at https://hub.docker.com/r/defaultvalue/php/tags 5 | # Can be used as SSL termination proxy BEFORE Varnish, not after it! 6 | ##### 7 | 8 | # ENV VARIABLES: 9 | # - DOCKERIZER_SSL_CERTIFICATES_DIR: `~/misc/certs/` or other folder in the host system where SSL certificates are stored 10 | 11 | services: 12 | php: 13 | # Must be enclosed in double quotes, otherwise YAML is invalid 14 | # Container name is used as a directory name to dump composition files 15 | container_name: '{{domains|first}}-{{environment}}' 16 | image: defaultvalue/php:{{php_version}}-production 17 | user: docker:docker 18 | sysctls: 19 | - net.ipv4.ip_unprivileged_port_start=0 20 | restart: always 21 | networks: 22 | default: 23 | aliases: 24 | - '{{domains|explode|to_yaml_array:10|remove_single_quotes_wrapper}}' # Must explicitly declare line indent 25 | labels: 26 | - traefik.enable=true 27 | # HTTP 28 | # Do not auto-redirect to HTTPS to have ability to do this on the web server level 29 | - traefik.http.routers.{{domains|first|replace:.:-}}-http.rule=Host({{domains|explode|enclose:`|implode:,}}) 30 | - traefik.http.routers.{{domains|first|replace:.:-}}-http.entrypoints=http 31 | - traefik.http.routers.{{domains|first|replace:.:-}}-http.service={{domains|first|replace:.:-}}-http 32 | - traefik.http.services.{{domains|first|replace:.:-}}-http.loadbalancer.server.port=80 33 | - traefik.http.services.{{domains|first|replace:.:-}}-http.loadbalancer.server.scheme=http 34 | # HTTPS 35 | - traefik.http.routers.{{domains|first|replace:.:-}}-https.rule=Host({{domains|explode|enclose:`|implode:,}}) 36 | - traefik.http.routers.{{domains|first|replace:.:-}}-https.entrypoints=https 37 | - traefik.http.routers.{{domains|first|replace:.:-}}-https.tls=true 38 | - traefik.http.routers.{{domains|first|replace:.:-}}-https.service={{domains|first|replace:.:-}}-https 39 | - traefik.http.services.{{domains|first|replace:.:-}}-https.loadbalancer.server.port=443 40 | - traefik.http.services.{{domains|first|replace:.:-}}-https.loadbalancer.server.scheme=https 41 | volumes: 42 | - .:/var/www/html 43 | - ${DOCKERIZER_SSL_CERTIFICATES_DIR}:/certs 44 | # Substitute default host file so that it does not interact with our custom host 45 | - ./apache/virtual-host.conf:/etc/apache2/sites-enabled/000-default.conf:ro 46 | # For testing with composer packages cache 47 | #- ${HOME}/misc/apps/composer_package_cache:/home/docker/.composer/cache -------------------------------------------------------------------------------- /src/Docker/Compose/Composition/Template/Collection.php: -------------------------------------------------------------------------------- 1 | getItems() as $template) { 33 | $supportedPackages = $template->getSupportedPackages(); 34 | 35 | if (!isset($supportedPackages[$packageName])) { 36 | continue; 37 | } 38 | 39 | if (Semver::satisfies($packageVersion, $supportedPackages[$packageName])) { 40 | $templatesList[$template->getCode()] = $template; 41 | } 42 | } 43 | 44 | return $templatesList; 45 | } 46 | 47 | /** 48 | * @param array $requiredProjectPackages 49 | * @return array 50 | */ 51 | public function getSuitableTemplates(array $requiredProjectPackages): array 52 | { 53 | $templatesList = []; 54 | 55 | foreach ($this->getItems() as $template) { 56 | $suitableFor = []; 57 | 58 | foreach ($template->getSupportedPackages() as $supportedPackage => $versionConstraint) { 59 | if (!isset($requiredProjectPackages[$supportedPackage])) { 60 | continue; 61 | } 62 | 63 | if (Semver::satisfies($requiredProjectPackages[$supportedPackage], $versionConstraint)) { 64 | $suitableFor[] = $supportedPackage; 65 | } 66 | } 67 | 68 | if ($suitableFor) { 69 | $templatesList[$template->getCode()] = $suitableFor; 70 | } 71 | } 72 | 73 | return $templatesList; 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /templates/vendor/defaultvalue/dockerizer-templates/composition/magento/magento_2.4.6_apache_p5.yaml: -------------------------------------------------------------------------------- 1 | app: 2 | description: Magento 2.4.6-p5 (Apache) 3 | # System requirements based on https://experienceleague.adobe.com/docs/commerce-operations/release/notes/magento-open-source/2-4-6.html 4 | supported_packages: 5 | magento/project-community-edition: '>=2.4.6-p5 <2.4.7' 6 | magento/project-enterprise-edition: '>=2.4.6-p5 <2.4.7' 7 | magento/product-community-edition: '>=2.4.6-p5 <2.4.7' 8 | magento/product-enterprise-edition: '>=2.4.6-p5 <2.4.7' 9 | parameters: 10 | environment: 'prod' 11 | mysql_root_random_password: '' 12 | mysql_database: magento_db 13 | mysql_user: magento_user 14 | mysql_random_password: '' 15 | composition: 16 | required: 17 | apache: 18 | php_8_2_apache: 19 | service: dv_php_apache 20 | dev_tools: 21 | - php_apache_development_image 22 | - mailhog 23 | parameters: 24 | composer_version: 2 25 | php_version: '8.2.18' 26 | web_root: 'pub/' 27 | php_8_1_apache: 28 | service: dv_php_apache 29 | dev_tools: 30 | - php_apache_development_image 31 | - mailhog 32 | parameters: 33 | composer_version: 2 34 | php_version: '8.1.27' 35 | web_root: 'pub/' 36 | database: 37 | mysql_8_0_persistent: 38 | service: dv_mysql_8_0 39 | dev_tools: phpmyadmin 40 | parameters: 41 | mysql_version: '8.0' 42 | mariadb_10_6_persistent: 43 | service: dv_mariadb_10_2_and_above 44 | dev_tools: phpmyadmin 45 | parameters: 46 | mariadb_version: '10.6' 47 | mariadb_10_4_persistent: 48 | service: dv_mariadb_10_2_and_above 49 | dev_tools: phpmyadmin 50 | parameters: 51 | mariadb_version: '10.4' 52 | # Does not work with 8.4! Installing Sample data and generating fixtures fail due to MSI issues. 53 | # https://github.com/magento/magento2/issues/36687#issuecomment-1475984941 54 | search_engine: 55 | elasticsearch_7_17_20_persistent: 56 | service: dv_elasticsearch 57 | parameters: 58 | elasticsearch_version: '7.17.20' 59 | opensearch_2_12_0: 60 | service: opensearch 61 | dev_tools: opensearch_dashboards 62 | parameters: 63 | opensearch_version: '2.12.0' 64 | opensearch_dashboards_version: '2.12.0' 65 | 66 | optional: 67 | redis: 68 | redis_7_0: 69 | service: dv_redis 70 | parameters: 71 | redis_version: '7.0' -------------------------------------------------------------------------------- /templates/vendor/defaultvalue/dockerizer-templates/composition/shopware/shopware_5.7.x_apache.yaml: -------------------------------------------------------------------------------- 1 | app: 2 | description: Shopware 5.7.x (Apache) 3 | parameters: 4 | environment: 'prod' 5 | mysql_root_random_password: '' 6 | mysql_database: shopware_db 7 | mysql_user: shopware_user 8 | mysql_random_password: '' 9 | composition: 10 | required: 11 | apache: 12 | php_7_4_apache: 13 | service: dv_php_apache 14 | dev_tools: 15 | - php_apache_development_image 16 | - mailhog 17 | parameters: 18 | composer_version: 2 19 | php_version: '7.4.33' 20 | web_root: '/' 21 | php_8_0_apache: 22 | service: dv_php_apache 23 | dev_tools: 24 | - php_apache_development_image 25 | - mailhog 26 | parameters: 27 | composer_version: 2 28 | php_version: '8.0.30' 29 | web_root: '/' 30 | database: 31 | mysql_5_7_persistent: 32 | service: dv_mysql_5_6_and_5_7 33 | dev_tools: phpmyadmin 34 | parameters: 35 | mysql_version: '5.7' 36 | mysql_8_0_persistent: 37 | service: dv_mysql_8_0 38 | dev_tools: phpmyadmin 39 | parameters: 40 | mysql_version: '8.0' 41 | 42 | optional: 43 | elasticsearch: 44 | # Shopware 5.7.x documentation elastic search versions 45 | # https://developers.shopware.com/sysadmins-guide/elasticsearch-setup/ 46 | elasticsearch_7_6_2_persistent: 47 | service: dv_elasticsearch 48 | parameters: 49 | elasticsearch_version: '7.6.2' 50 | elasticsearch_7_7_1_persistent: 51 | service: dv_elasticsearch 52 | parameters: 53 | elasticsearch_version: '7.7.1' 54 | elasticsearch_7_9_3_persistent: 55 | service: dv_elasticsearch 56 | parameters: 57 | elasticsearch_version: '7.9.3' 58 | elasticsearch_7_10_1_persistent: 59 | service: dv_elasticsearch 60 | parameters: 61 | elasticsearch_version: '7.10.1' 62 | elasticsearch_7_16_3_persistent: 63 | service: dv_elasticsearch 64 | parameters: 65 | elasticsearch_version: '7.16.3' 66 | elasticsearch_7_17_5_persistent: 67 | service: dv_elasticsearch 68 | parameters: 69 | elasticsearch_version: '7.17.5' 70 | redis: 71 | redis_5_0: 72 | service: dv_redis 73 | parameters: 74 | redis_version: '5.0' 75 | redis_6_2: 76 | service: dv_redis 77 | parameters: 78 | redis_version: '6.2' -------------------------------------------------------------------------------- /templates/vendor/defaultvalue/dockerizer-templates/composition/magento/magento_2.3.4_apache.yaml: -------------------------------------------------------------------------------- 1 | app: 2 | description: Magento 2.3.4 3 | supported_packages: # get package info from composer.json to validate that template is applied to the correct app version 4 | # Use composer semantic versioning https://getcomposer.org/doc/articles/versions.md 5 | magento/project-community-edition: '>=2.3.4 <2.3.5' 6 | magento/project-enterprise-edition: '>=2.3.4 <2.3.5' 7 | magento/product-community-edition: '>=2.3.4 <2.3.5' 8 | magento/product-enterprise-edition: '>=2.3.4 <2.3.5' 9 | # Global parameters that are passed to every service 10 | parameters: 11 | environment: 'prod' 12 | mysql_root_random_password: '' 13 | mysql_database: magento_db 14 | mysql_user: magento_user 15 | mysql_random_password: '' 16 | composition: 17 | required: 18 | apache: 19 | php_7_3_apache: 20 | service: dv_php_apache 21 | dev_tools: 22 | - php_apache_development_image 23 | - mailhog 24 | parameters: 25 | composer_version: 1 26 | php_version: '7.3.33' 27 | web_root: 'pub/' 28 | php_7_2_apache: 29 | service: dv_php_apache 30 | dev_tools: 31 | - php_apache_development_image 32 | - mailhog 33 | parameters: 34 | composer_version: 1 35 | php_version: '7.2.34' 36 | web_root: 'pub/' 37 | database: 38 | mysql_5_7_persistent: 39 | service: dv_mysql_5_6_and_5_7 40 | dev_tools: phpmyadmin 41 | parameters: 42 | mysql_version: '5.7' 43 | mysql_5_6_persistent: 44 | service: dv_mysql_5_6_and_5_7 45 | dev_tools: phpmyadmin 46 | parameters: 47 | mysql_version: '5.6' 48 | mariadb_10_2_persistent: 49 | service: dv_mariadb_10_2_and_above 50 | dev_tools: phpmyadmin 51 | parameters: 52 | mariadb_version: '10.2' 53 | mariadb_10_1_persistent: 54 | service: dv_mariadb_10_1 55 | dev_tools: phpmyadmin 56 | parameters: 57 | mariadb_version: '10.1' 58 | 59 | optional: 60 | redis: 61 | redis_5_0: 62 | service: dv_redis 63 | parameters: 64 | redis_version: '5.0' 65 | elasticsearch: 66 | elasticsearch_5_6_16_persistent: 67 | service: dv_elasticsearch 68 | parameters: 69 | elasticsearch_version: '5.6.16-alpine' 70 | elasticsearch_6_8_23_persistent: 71 | service: dv_elasticsearch 72 | parameters: 73 | elasticsearch_version: '6.8.23' 74 | # @TODO: what about cron jobs service? -------------------------------------------------------------------------------- /src/Console/Command/AbstractCompositionAwareCommand.php: -------------------------------------------------------------------------------- 1 | hasArgument(CommandOptionComposition::ARGUMENT_COLLECTION_FILTER)) { 49 | $filter = (string) $input->getArgument(CommandOptionComposition::ARGUMENT_COLLECTION_FILTER); 50 | } else { 51 | $filter = ''; 52 | } 53 | 54 | /** @var CommandOptionComposition $commandOptionComposition */ 55 | $commandOptionComposition = $this->getCommandSpecificOption(CommandOptionComposition::OPTION_NAME); 56 | $commandOptionComposition->setFilter($filter); 57 | $dockerCompose = $this->getCommandSpecificOptionValue($input, $output, CommandOptionComposition::OPTION_NAME); 58 | $collection = $this->compositionCollection->getList('', (string) $dockerCompose); 59 | 60 | return $collection[$dockerCompose]; 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /templates/vendor/defaultvalue/dockerizer-templates/composition/magento/magento_2.4.7_apache_p0.yaml: -------------------------------------------------------------------------------- 1 | app: 2 | description: Magento 2.4.7 (Apache) 3 | # System requirements based on https://experienceleague.adobe.com/docs/commerce-operations/release/notes/magento-open-source/2-4-7.html 4 | supported_packages: 5 | magento/project-community-edition: '>=2.4.7 <2.4.8' 6 | magento/project-enterprise-edition: '>=2.4.7 <2.4.8' 7 | magento/product-community-edition: '>=2.4.7 <2.4.8' 8 | magento/product-enterprise-edition: '>=2.4.7 <2.4.8' 9 | parameters: 10 | environment: 'prod' 11 | mysql_root_random_password: '' 12 | mysql_database: magento_db 13 | mysql_user: magento_user 14 | mysql_random_password: '' 15 | rabbitmq_username: magento 16 | rabbitmq_password: magento 17 | rabbitmq_vhost: / 18 | composition: 19 | required: 20 | apache: 21 | php_8_3_apache: 22 | service: dv_php_apache_8_3 23 | dev_tools: 24 | - php_apache_development_image 25 | - mailhog 26 | parameters: 27 | php_version: '8.3.17' 28 | web_root: 'pub/' 29 | php_8_2_apache: 30 | service: dv_php_apache 31 | dev_tools: 32 | - php_apache_development_image 33 | - mailhog 34 | parameters: 35 | composer_version: 2 36 | php_version: '8.2.18' 37 | web_root: 'pub/' 38 | database: 39 | mysql_8_0_persistent: 40 | service: dv_mysql_8_0 41 | dev_tools: phpmyadmin 42 | parameters: 43 | mysql_version: '8.0' 44 | mariadb_10_6_persistent: 45 | service: dv_mariadb_10_2_and_above 46 | dev_tools: phpmyadmin 47 | parameters: 48 | mariadb_version: '10.6' 49 | search_engine: 50 | # Does not work with 8.11! Still installs package 7.17.2 due to the incorrect dependencies! 51 | elasticsearch_7_17_20_persistent: 52 | service: dv_elasticsearch 53 | parameters: 54 | elasticsearch_version: '7.17.20' 55 | opensearch_2_12_0: 56 | service: opensearch 57 | dev_tools: opensearch_dashboards 58 | parameters: 59 | opensearch_version: '2.12.0' 60 | opensearch_dashboards_version: '2.12.0' 61 | 62 | optional: 63 | redis: 64 | redis_7_2: 65 | service: dv_redis 66 | parameters: 67 | redis_version: '7.2' 68 | rabbitmq: 69 | rabbitmq_3_12: 70 | service: dv_rabbitmq 71 | parameters: 72 | rabbitmq_version: '3.12' 73 | rabbitmq_3_9: 74 | service: dv_rabbitmq 75 | parameters: 76 | rabbitmq_version: '3.9' -------------------------------------------------------------------------------- /templates/vendor/defaultvalue/dockerizer-templates/service/php/dv_php_apache.yaml: -------------------------------------------------------------------------------- 1 | version: '3.7' 2 | 3 | ##### 4 | # Check for available PHP versions at https://hub.docker.com/r/defaultvalue/php/tags 5 | # Can be used as SSL termination proxy BEFORE Varnish, not after it! 6 | ##### 7 | 8 | # ENV VARIABLES: 9 | # - DOCKERIZER_SSL_CERTIFICATES_DIR: `~/misc/certs/` or other folder in the host system where SSL certificates are stored 10 | 11 | services: 12 | php: 13 | # Must be enclosed in double quotes, otherwise YAML is invalid 14 | # Container name is used as a directory name to dump composition files 15 | container_name: '{{domains|first}}-{{environment}}' 16 | image: defaultvalue/php:{{php_version}}-production 17 | user: docker:docker 18 | sysctls: 19 | - net.ipv4.ip_unprivileged_port_start=0 20 | restart: always 21 | networks: 22 | default: 23 | aliases: 24 | - '{{domains|explode|to_yaml_array:10|remove_single_quotes_wrapper}}' # Must explicitly declare line indent 25 | labels: 26 | - traefik.enable=true 27 | # HTTP 28 | # Do not auto-redirect to HTTPS to have ability to do this on the web server level 29 | - traefik.http.routers.{{domains|first|replace:.:-}}-http.rule=Host({{domains|explode|enclose:`|implode:,}}) 30 | - traefik.http.routers.{{domains|first|replace:.:-}}-http.entrypoints=http 31 | - traefik.http.routers.{{domains|first|replace:.:-}}-http.service={{domains|first|replace:.:-}}-http 32 | - traefik.http.services.{{domains|first|replace:.:-}}-http.loadbalancer.server.port=80 33 | - traefik.http.services.{{domains|first|replace:.:-}}-http.loadbalancer.server.scheme=http 34 | # HTTPS 35 | - traefik.http.routers.{{domains|first|replace:.:-}}-https.rule=Host({{domains|explode|enclose:`|implode:,}}) 36 | - traefik.http.routers.{{domains|first|replace:.:-}}-https.entrypoints=https 37 | - traefik.http.routers.{{domains|first|replace:.:-}}-https.tls=true 38 | - traefik.http.routers.{{domains|first|replace:.:-}}-https.service={{domains|first|replace:.:-}}-https 39 | - traefik.http.services.{{domains|first|replace:.:-}}-https.loadbalancer.server.port=443 40 | - traefik.http.services.{{domains|first|replace:.:-}}-https.loadbalancer.server.scheme=https 41 | environment: 42 | - COMPOSER_VERSION={{composer_version}} # Does not affect PHP 8.3 and later images 43 | volumes: 44 | - .:/var/www/html 45 | - ${DOCKERIZER_SSL_CERTIFICATES_DIR}:/certs 46 | # Substitute default host file so that it does not interact with our custom host 47 | - ./apache/virtual-host.conf:/etc/apache2/sites-enabled/000-default.conf:ro 48 | # For testing with composer packages cache 49 | #- ${HOME}/misc/apps/composer_package_cache:/home/docker/.composer/cache -------------------------------------------------------------------------------- /src/AWS/S3.php: -------------------------------------------------------------------------------- 1 | client ??= new S3Client([ 39 | 'version' => 'latest', 40 | 'region' => $region ?: $this->env->getEnv(self::ENV_AWS_S3_REGION) 41 | ]); 42 | 43 | return $this->client; 44 | } 45 | 46 | /** 47 | * @param string $bucket 48 | * @param string $key 49 | * @param string $sourceFile 50 | * @param string $body 51 | * @return void 52 | */ 53 | public function upload(string $bucket, string $key, string $sourceFile = '', string $body = ''): void 54 | { 55 | if (!$sourceFile && !$body) { 56 | throw new \InvalidArgumentException('Neither source file nor body supplied'); 57 | } 58 | 59 | if ($sourceFile && $body) { 60 | throw new \InvalidArgumentException('Must provide either source file or body'); 61 | } 62 | 63 | if ($sourceFile && !$this->filesystem->isFile($sourceFile)) { 64 | throw new FileNotFoundException(null, 0, null, $sourceFile); 65 | } 66 | 67 | $data = [ 68 | 'Bucket' => $bucket, 69 | 'Key' => $key 70 | ]; 71 | 72 | if ($sourceFile) { 73 | $data['SourceFile'] = $sourceFile; 74 | } else { 75 | $data['Body'] = $body; 76 | } 77 | 78 | // Send a PutObject request and get the result object. 79 | $result = $this->getClient()->putObject($data); 80 | $result->get('ObjectURL') ?: throw new \RuntimeException('Unable to upload a database dump to AWS'); 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /config/services.yaml: -------------------------------------------------------------------------------- 1 | imports: 2 | - { resource: 'extends/*.yaml' } 3 | 4 | services: 5 | _defaults: 6 | autowire: true 7 | autoconfigure: true 8 | _instanceof: 9 | # All classes implementing DataTransferObjectInterface are DTO 10 | # and must be created via \DefaultValue\Dockerizer\DependencyInjection\Factory 11 | DefaultValue\Dockerizer\DependencyInjection\DataTransferObjectInterface: 12 | shared: false 13 | public: true 14 | # Console commands and related things 15 | Symfony\Component\Console\Command\Command: 16 | tags: [ 'console.command' ] 17 | DefaultValue\Dockerizer\Console\CommandArgument\CommandArgumentInterface: 18 | tags: [ 'console.commandArgument' ] 19 | DefaultValue\Dockerizer\Console\CommandOption\OptionDefinitionInterface: 20 | tags: [ 'console.commandOption' ] 21 | DefaultValue\Dockerizer\Console\Command\AbstractParameterAwareCommand: 22 | bind: 23 | iterable $availableCommandOptions: !tagged_iterator console.commandOption 24 | # iterable $availableCommandArguments: !tagged_iterator console.commandArgument 25 | # A list of classes for post-processing composition configuration 26 | DefaultValue\Dockerizer\Docker\Compose\Composition\PostCompilation\ModifierInterface: 27 | tags: [ 'docker.compose.postCompilationModifier' ] 28 | DefaultValue\Dockerizer\Docker\Compose\Composition\PostCompilation\ModifierCollection: 29 | bind: 30 | iterable $postCompilationModifiers: !tagged_iterator docker.compose.postCompilationModifier 31 | # Other 32 | DefaultValue\Dockerizer\Filesystem\ProjectRootAwareInterface: 33 | bind: 34 | string $dockerizerRootDir: '%kernel.project_dir%' 35 | 36 | DefaultValue\Dockerizer\: 37 | resource: '../src/*' 38 | 39 | DefaultValue\Dockerizer\DependencyInjection\Factory: 40 | arguments: 41 | $container: '@service_container' 42 | 43 | DefaultValue\Dockerizer\Docker\Compose\Composition\Template\Collection: 44 | arguments: 45 | $dirToScan: './templates/vendor/*/*/composition/' 46 | 47 | DefaultValue\Dockerizer\Docker\Compose\Composition\Service\Collection: 48 | arguments: 49 | $dirToScan: './templates/vendor/*/*/service/' 50 | 51 | DefaultValue\Dockerizer\Docker\Compose\Composition\DevTools\Collection: 52 | arguments: 53 | $dirToScan: './templates/vendor/*/*/dev_tools/' 54 | 55 | # @TODO: is there a better way to autowire this? 56 | Symfony\Component\HttpClient\: 57 | resource: '../vendor/symfony/http-client/*' 58 | 59 | Composer\Semver\VersionParser: 60 | autowire: true 61 | # app.dotenv: 62 | # class: Symfony\Component\Dotenv\Dotenv 63 | 64 | # local_infrastructure: 65 | # composition: ~/misc/apps/docker-infrastructure/local_infrastructure/docker-compose.yml 66 | # default_network: infrastructure_network 67 | 68 | -------------------------------------------------------------------------------- /templates/vendor/defaultvalue/dockerizer-templates/composition/magento/magento_2.4.4_nginx_varnish_apache_p8.yaml: -------------------------------------------------------------------------------- 1 | app: 2 | description: Magento 2.4.4-p8 (Nginx + Varnish + Apache) 3 | supported_packages: 4 | magento/project-community-edition: '>=2.4.4-p8 <2.4.5' 5 | magento/project-enterprise-edition: '>=2.4.4-p8 <2.4.5' 6 | magento/product-community-edition: '>=2.4.4-p8 <2.4.5' 7 | magento/product-enterprise-edition: '>=2.4.4-p8 <2.4.5' 8 | parameters: 9 | environment: 'prod' 10 | mysql_root_random_password: '' 11 | mysql_database: magento_db 12 | mysql_user: magento_user 13 | mysql_random_password: '' 14 | composition: 15 | required: 16 | nginx: 17 | nginx_latest: 18 | service: dv_nginx_proxy_for_varnish 19 | varnish: 20 | varnish_7_5: 21 | service: dv_varnish_magento 22 | parameters: 23 | # docker-compose service name goes here 24 | backend_host: php 25 | # Config path: full_page_cache/default/grace_period 26 | grace_period: 300 27 | # Config path: web/secure/offloader_header. Changed to `X-Forwarded-Proto` since Magento 2.1 28 | ssl_offloaded_header: 'X-Forwarded-Proto' 29 | # Use `/pub/health_check.php` in case the web root equals to the project root 30 | health_check: '/health_check.php' 31 | varnish_version: 7.5-alpine 32 | # Actually used for Nginx service 33 | varnish_port: 80 34 | apache: 35 | php_8_1_apache: 36 | service: dv_php_apache_unsecure 37 | dev_tools: 38 | - php_apache_development_image 39 | - mailhog 40 | parameters: 41 | composer_version: 2 42 | php_version: '8.1.27' 43 | web_root: 'pub/' 44 | php_7_4_apache: 45 | service: dv_php_apache_unsecure 46 | dev_tools: 47 | - php_apache_development_image 48 | - mailhog 49 | parameters: 50 | composer_version: 2 51 | php_version: '7.4.33' 52 | web_root: 'pub/' 53 | database: 54 | mysql_8_0_persistent: 55 | service: dv_mysql_8_0 56 | dev_tools: phpmyadmin 57 | parameters: 58 | mysql_version: '8.0.28' 59 | mariadb_10_4_persistent: 60 | service: dv_mariadb_10_2_and_above 61 | dev_tools: phpmyadmin 62 | parameters: 63 | mariadb_version: '10.4' 64 | elasticsearch: 65 | elasticsearch_7_17_20_persistent: 66 | service: dv_elasticsearch 67 | parameters: 68 | elasticsearch_version: '7.17.20' 69 | 70 | optional: 71 | redis: 72 | redis_7_0: 73 | service: dv_redis 74 | parameters: 75 | redis_version: '7.0' -------------------------------------------------------------------------------- /templates/vendor/defaultvalue/dockerizer-templates/composition/magento/magento_2.4.5_nginx_varnish_apache_p7.yaml: -------------------------------------------------------------------------------- 1 | app: 2 | description: Magento 2.4.5-p7 (Nginx + Varnish + Apache) 3 | supported_packages: 4 | magento/project-community-edition: '>=2.4.5-p7 <2.4.6' 5 | magento/project-enterprise-edition: '>=2.4.5-p7 <2.4.6' 6 | magento/product-community-edition: '>=2.4.5-p7 <2.4.6' 7 | magento/product-enterprise-edition: '>=2.4.5-p7 <2.4.6' 8 | parameters: 9 | environment: 'prod' 10 | mysql_root_random_password: '' 11 | mysql_database: magento_db 12 | mysql_user: magento_user 13 | mysql_random_password: '' 14 | composition: 15 | required: 16 | nginx: 17 | nginx_latest: 18 | service: dv_nginx_proxy_for_varnish 19 | varnish: 20 | varnish_7_5: 21 | service: dv_varnish_magento 22 | parameters: 23 | # docker-compose service name goes here 24 | backend_host: php 25 | # Config path: full_page_cache/default/grace_period 26 | grace_period: 300 27 | # Config path: web/secure/offloader_header. Changed to `X-Forwarded-Proto` since Magento 2.1 28 | ssl_offloaded_header: 'X-Forwarded-Proto' 29 | # Use `/pub/health_check.php` in case the web root equals to the project root 30 | health_check: '/health_check.php' 31 | varnish_version: 7.5-alpine 32 | # Actually used for Nginx service 33 | varnish_port: 80 34 | apache: 35 | php_8_1_apache: 36 | service: dv_php_apache_unsecure 37 | dev_tools: 38 | - php_apache_development_image 39 | - mailhog 40 | parameters: 41 | composer_version: 2 42 | php_version: '8.1.27' 43 | web_root: 'pub/' 44 | php_7_4_apache: 45 | service: dv_php_apache_unsecure 46 | dev_tools: 47 | - php_apache_development_image 48 | - mailhog 49 | parameters: 50 | composer_version: 2 51 | php_version: '7.4.33' 52 | web_root: 'pub/' 53 | database: 54 | mysql_8_0_persistent: 55 | service: dv_mysql_8_0 56 | dev_tools: phpmyadmin 57 | parameters: 58 | mysql_version: '8.0.28' 59 | mariadb_10_4_persistent: 60 | service: dv_mariadb_10_2_and_above 61 | dev_tools: phpmyadmin 62 | parameters: 63 | mariadb_version: '10.4' 64 | elasticsearch: 65 | elasticsearch_7_17_20_persistent: 66 | service: dv_elasticsearch 67 | parameters: 68 | elasticsearch_version: '7.17.20' 69 | 70 | optional: 71 | redis: 72 | redis_7_0: 73 | service: dv_redis 74 | parameters: 75 | redis_version: '7.0' -------------------------------------------------------------------------------- /src/Console/Command/Composition/Template/Meta.php: -------------------------------------------------------------------------------- 1 | setDescription('WIP: Show template meta information'); 41 | // --all to get all meta, filter to filter by app name and/or version 42 | // $this->addArgument() 43 | //'version', 44 | //InputArgument::REQUIRED, 45 | //'Semantic Magento version like 2.2.10, 2.3.2 etc.' 46 | parent::configure(); 47 | } 48 | 49 | /** 50 | * @param InputInterface $input 51 | * @param OutputInterface $output 52 | * @return int 53 | */ 54 | protected function execute(InputInterface $input, OutputInterface $output): int 55 | { 56 | // $template = $this->templateList->getFile($input->getArgument()); 57 | foreach ($this->templateCollection as $template) { 58 | $this->outputTemplateMeta($output, $template); 59 | $output->writeln(PHP_EOL . '---' . PHP_EOL); 60 | } 61 | 62 | return self::SUCCESS; 63 | } 64 | 65 | /** 66 | * @param OutputInterface $output 67 | * @param Template $template 68 | */ 69 | private function outputTemplateMeta(OutputInterface $output, Template $template): void 70 | { 71 | $output->writeln("Template code: {$template->getCode()}"); 72 | $output->writeln("Description: {$template->getDescription()}"); 73 | $output->writeln('Supported apps:'); 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /templates/vendor/defaultvalue/dockerizer-templates/composition/magento/magento_2.4.4_nginx_varnish_apache_p3.yaml: -------------------------------------------------------------------------------- 1 | app: 2 | description: Magento 2.4.4-p3 (Nginx + Varnish + Apache) 3 | supported_packages: 4 | magento/project-community-edition: '>=2.4.4-p3 <2.4.4-p4' 5 | magento/project-enterprise-edition: '>=2.4.4-p3 <2.4.4-p4' 6 | magento/product-community-edition: '>=2.4.4-p3 <2.4.4-p4' 7 | magento/product-enterprise-edition: '>=2.4.4-p3 <2.4.4-p4' 8 | parameters: 9 | environment: 'prod' 10 | mysql_root_random_password: '' 11 | mysql_database: magento_db 12 | mysql_user: magento_user 13 | mysql_random_password: '' 14 | composition: 15 | required: 16 | nginx: 17 | nginx_latest: 18 | service: dv_nginx_proxy_for_varnish 19 | varnish: 20 | varnish_7_1: 21 | service: dv_varnish_magento 22 | parameters: 23 | # docker-compose service name goes here 24 | backend_host: php 25 | # Config path: full_page_cache/default/grace_period 26 | grace_period: 300 27 | # Config path: web/secure/offloader_header. Changed to `X-Forwarded-Proto` since Magento 2.1 28 | ssl_offloaded_header: 'X-Forwarded-Proto' 29 | # Use `/pub/health_check.php` in case the web root equals to the project root 30 | health_check: '/health_check.php' 31 | varnish_version: 7.1-alpine 32 | # Actually used for Nginx service 33 | varnish_port: 80 34 | apache: 35 | php_8_1_apache: 36 | service: dv_php_apache_unsecure 37 | dev_tools: 38 | - php_apache_development_image 39 | - mailhog 40 | parameters: 41 | composer_version: 2 42 | php_version: '8.1.27' 43 | web_root: 'pub/' 44 | php_7_4_apache: 45 | service: dv_php_apache_unsecure 46 | dev_tools: 47 | - php_apache_development_image 48 | - mailhog 49 | parameters: 50 | composer_version: 2 51 | php_version: '7.4.33' 52 | web_root: 'pub/' 53 | database: 54 | mysql_8_0_persistent: 55 | service: dv_mysql_8_0 56 | dev_tools: phpmyadmin 57 | parameters: 58 | mysql_version: '8.0.28' 59 | mariadb_10_4_persistent: 60 | service: dv_mariadb_10_2_and_above 61 | dev_tools: phpmyadmin 62 | parameters: 63 | mariadb_version: '10.4' 64 | elasticsearch: 65 | elasticsearch_7_17_20_persistent: 66 | service: dv_elasticsearch 67 | parameters: 68 | elasticsearch_version: '7.17.20' 69 | 70 | optional: 71 | redis: 72 | redis_6_2: 73 | service: dv_redis 74 | parameters: 75 | redis_version: '6.2' -------------------------------------------------------------------------------- /templates/vendor/defaultvalue/dockerizer-templates/composition/magento/magento_2.4.5_nginx_varnish_apache_p0_p1.yaml: -------------------------------------------------------------------------------- 1 | app: 2 | description: Magento 2.4.5 - 2.4.5-p1 (Nginx + Varnish + Apache) 3 | supported_packages: 4 | magento/project-community-edition: '>=2.4.5 <2.4.5-p2' 5 | magento/project-enterprise-edition: '>=2.4.5 <2.4.5-p2' 6 | magento/product-community-edition: '>=2.4.5 <2.4.5-p2' 7 | magento/product-enterprise-edition: '>=2.4.5 <2.4.5-p2' 8 | parameters: 9 | environment: 'prod' 10 | mysql_root_random_password: '' 11 | mysql_database: magento_db 12 | mysql_user: magento_user 13 | mysql_random_password: '' 14 | composition: 15 | required: 16 | nginx: 17 | nginx_latest: 18 | service: dv_nginx_proxy_for_varnish 19 | varnish: 20 | varnish_7_0: 21 | service: dv_varnish_magento 22 | parameters: 23 | # docker-compose service name goes here 24 | backend_host: php 25 | # Config path: full_page_cache/default/grace_period 26 | grace_period: 300 27 | # Config path: web/secure/offloader_header. Changed to `X-Forwarded-Proto` since Magento 2.1 28 | ssl_offloaded_header: 'X-Forwarded-Proto' 29 | # Use `/pub/health_check.php` in case the web root equals to the project root 30 | health_check: '/health_check.php' 31 | varnish_version: 7.0-alpine 32 | # Actually used for Nginx service 33 | varnish_port: 80 34 | apache: 35 | php_8_1_apache: 36 | service: dv_php_apache_unsecure 37 | dev_tools: 38 | - php_apache_development_image 39 | - mailhog 40 | parameters: 41 | composer_version: 2 42 | php_version: '8.1.27' 43 | web_root: 'pub/' 44 | php_7_4_apache: 45 | service: dv_php_apache_unsecure 46 | dev_tools: 47 | - php_apache_development_image 48 | - mailhog 49 | parameters: 50 | composer_version: 2 51 | php_version: '7.4.33' 52 | web_root: 'pub/' 53 | database: 54 | mysql_8_0_persistent: 55 | service: dv_mysql_8_0 56 | dev_tools: phpmyadmin 57 | parameters: 58 | mysql_version: '8.0.28' 59 | mariadb_10_4_persistent: 60 | service: dv_mariadb_10_2_and_above 61 | dev_tools: phpmyadmin 62 | parameters: 63 | mariadb_version: '10.4' 64 | elasticsearch: 65 | elasticsearch_7_17_20_persistent: 66 | service: dv_elasticsearch 67 | parameters: 68 | elasticsearch_version: '7.17.20' 69 | 70 | optional: 71 | redis: 72 | redis_6_2: 73 | service: dv_redis 74 | parameters: 75 | redis_version: '6.2' -------------------------------------------------------------------------------- /templates/vendor/defaultvalue/dockerizer-templates/composition/magento/magento_2.4.5_nginx_varnish_apache_p2.yaml: -------------------------------------------------------------------------------- 1 | app: 2 | description: Magento 2.4.5-p2 (Nginx + Varnish + Apache) 3 | supported_packages: 4 | magento/project-community-edition: '>=2.4.5-p2 <2.4.5-p3' 5 | magento/project-enterprise-edition: '>=2.4.5-p2 <2.4.5-p3' 6 | magento/product-community-edition: '>=2.4.5-p2 <2.4.5-p3' 7 | magento/product-enterprise-edition: '>=2.4.5-p2 <2.4.5-p3' 8 | parameters: 9 | environment: 'prod' 10 | mysql_root_random_password: '' 11 | mysql_database: magento_db 12 | mysql_user: magento_user 13 | mysql_random_password: '' 14 | composition: 15 | required: 16 | nginx: 17 | nginx_latest: 18 | service: dv_nginx_proxy_for_varnish 19 | varnish: 20 | varnish_7_1: 21 | service: dv_varnish_magento 22 | parameters: 23 | # docker-compose service name goes here 24 | backend_host: php 25 | # Config path: full_page_cache/default/grace_period 26 | grace_period: 300 27 | # Config path: web/secure/offloader_header. Changed to `X-Forwarded-Proto` since Magento 2.1 28 | ssl_offloaded_header: 'X-Forwarded-Proto' 29 | # Use `/pub/health_check.php` in case the web root equals to the project root 30 | health_check: '/health_check.php' 31 | varnish_version: 7.1-alpine 32 | # Actually used for Nginx service 33 | varnish_port: 80 34 | apache: 35 | php_8_1_apache: 36 | service: dv_php_apache_unsecure 37 | dev_tools: 38 | - php_apache_development_image 39 | - mailhog 40 | parameters: 41 | composer_version: 2 42 | php_version: '8.1.27' 43 | web_root: 'pub/' 44 | php_7_4_apache: 45 | service: dv_php_apache_unsecure 46 | dev_tools: 47 | - php_apache_development_image 48 | - mailhog 49 | parameters: 50 | composer_version: 2 51 | php_version: '7.4.33' 52 | web_root: 'pub/' 53 | database: 54 | mysql_8_0_persistent: 55 | service: dv_mysql_8_0 56 | dev_tools: phpmyadmin 57 | parameters: 58 | mysql_version: '8.0.28' 59 | mariadb_10_4_persistent: 60 | service: dv_mariadb_10_2_and_above 61 | dev_tools: phpmyadmin 62 | parameters: 63 | mariadb_version: '10.4' 64 | elasticsearch: 65 | elasticsearch_7_17_20_persistent: 66 | service: dv_elasticsearch 67 | parameters: 68 | elasticsearch_version: '7.17.20' 69 | 70 | optional: 71 | redis: 72 | redis_6_2: 73 | service: dv_redis 74 | parameters: 75 | redis_version: '6.2' -------------------------------------------------------------------------------- /templates/vendor/defaultvalue/dockerizer-templates/composition/magento/magento_2.4.6_apache_p0_p4.yaml: -------------------------------------------------------------------------------- 1 | app: 2 | description: Magento 2.4.6 - 2.4.6-p4 (Apache) 3 | # System requirements based on https://experienceleague.adobe.com/docs/commerce-operations/release/notes/magento-open-source/2-4-6.html 4 | supported_packages: 5 | magento/project-community-edition: '>=2.4.6 <2.4.4-p5' 6 | magento/project-enterprise-edition: '>=2.4.6 <2.4.4-p5' 7 | magento/product-community-edition: '>=2.4.6 <2.4.4-p5' 8 | magento/product-enterprise-edition: '>=2.4.6 <2.4.4-p5' 9 | parameters: 10 | environment: 'prod' 11 | mysql_root_random_password: '' 12 | mysql_database: magento_db 13 | mysql_user: magento_user 14 | mysql_random_password: '' 15 | composition: 16 | required: 17 | apache: 18 | php_8_2_apache: 19 | service: dv_php_apache 20 | dev_tools: 21 | - php_apache_development_image 22 | - mailhog 23 | parameters: 24 | composer_version: 2 25 | php_version: '8.2.18' 26 | web_root: 'pub/' 27 | php_8_1_apache: 28 | service: dv_php_apache 29 | dev_tools: 30 | - php_apache_development_image 31 | - mailhog 32 | parameters: 33 | composer_version: 2 34 | php_version: '8.1.27' 35 | web_root: 'pub/' 36 | database: 37 | mysql_8_0_persistent: 38 | service: dv_mysql_8_0 39 | dev_tools: phpmyadmin 40 | parameters: 41 | mysql_version: '8.0' 42 | mariadb_10_6_persistent: 43 | service: dv_mariadb_10_2_and_above 44 | dev_tools: phpmyadmin 45 | parameters: 46 | mariadb_version: '10.6' 47 | mariadb_10_4_persistent: 48 | service: dv_mariadb_10_2_and_above 49 | dev_tools: phpmyadmin 50 | parameters: 51 | mariadb_version: '10.4' 52 | # Does not work with 8.4! Installing Sample data and generating fixtures fail due to MSI issues. 53 | # https://github.com/magento/magento2/issues/36687#issuecomment-1475984941 54 | search_engine: 55 | elasticsearch_7_17_20_persistent: 56 | service: dv_elasticsearch 57 | parameters: 58 | elasticsearch_version: '7.17.20' 59 | opensearch_2_5: 60 | service: magento_opensearch 61 | dev_tools: opensearch_dashboards 62 | parameters: 63 | opensearch_version: '2.5-1.3.5' 64 | opensearch_dashboards_version: '2.5.0' 65 | 66 | optional: 67 | redis: 68 | redis_7_0: 69 | service: dv_redis 70 | parameters: 71 | redis_version: '7.0' 72 | redis_6_2: 73 | service: dv_redis 74 | parameters: 75 | redis_version: '6.2' -------------------------------------------------------------------------------- /templates/vendor/defaultvalue/dockerizer-templates/composition/magento/magento_2.4.4_nginx_varnish_apache_p4_p7.yaml: -------------------------------------------------------------------------------- 1 | app: 2 | description: Magento 2.4.4-p4 - 2.4.4-p7 (Nginx + Varnish + Apache) 3 | supported_packages: 4 | magento/project-community-edition: '>=2.4.4-p4 <2.4.4-p8' 5 | magento/project-enterprise-edition: '>=2.4.4-p4 <2.4.4-p8' 6 | magento/product-community-edition: '>=2.4.4-p4 <2.4.4-p8' 7 | magento/product-enterprise-edition: '>=2.4.4-p4 <2.4.4-p8' 8 | parameters: 9 | environment: 'prod' 10 | mysql_root_random_password: '' 11 | mysql_database: magento_db 12 | mysql_user: magento_user 13 | mysql_random_password: '' 14 | composition: 15 | required: 16 | nginx: 17 | nginx_latest: 18 | service: dv_nginx_proxy_for_varnish 19 | varnish: 20 | varnish_7_3: 21 | service: dv_varnish_magento 22 | parameters: 23 | # docker-compose service name goes here 24 | backend_host: php 25 | # Config path: full_page_cache/default/grace_period 26 | grace_period: 300 27 | # Config path: web/secure/offloader_header. Changed to `X-Forwarded-Proto` since Magento 2.1 28 | ssl_offloaded_header: 'X-Forwarded-Proto' 29 | # Use `/pub/health_check.php` in case the web root equals to the project root 30 | health_check: '/health_check.php' 31 | varnish_version: 7.3-alpine 32 | # Actually used for Nginx service 33 | varnish_port: 80 34 | apache: 35 | php_8_1_apache: 36 | service: dv_php_apache_unsecure 37 | dev_tools: 38 | - php_apache_development_image 39 | - mailhog 40 | parameters: 41 | composer_version: 2 42 | php_version: '8.1.27' 43 | web_root: 'pub/' 44 | php_7_4_apache: 45 | service: dv_php_apache_unsecure 46 | dev_tools: 47 | - php_apache_development_image 48 | - mailhog 49 | parameters: 50 | composer_version: 2 51 | php_version: '7.4.33' 52 | web_root: 'pub/' 53 | database: 54 | mysql_8_0_persistent: 55 | service: dv_mysql_8_0 56 | dev_tools: phpmyadmin 57 | parameters: 58 | mysql_version: '8.0.28' 59 | mariadb_10_4_persistent: 60 | service: dv_mariadb_10_2_and_above 61 | dev_tools: phpmyadmin 62 | parameters: 63 | mariadb_version: '10.4' 64 | elasticsearch: 65 | elasticsearch_7_17_20_persistent: 66 | service: dv_elasticsearch 67 | parameters: 68 | elasticsearch_version: '7.17.20' 69 | 70 | optional: 71 | redis: 72 | redis_6_2: 73 | service: dv_redis 74 | parameters: 75 | redis_version: '6.2' -------------------------------------------------------------------------------- /templates/vendor/defaultvalue/dockerizer-templates/composition/magento/magento_2.4.5_nginx_varnish_apache_p3_p6.yaml: -------------------------------------------------------------------------------- 1 | app: 2 | description: Magento >=2.4.5-p3 <2.4.5-p6 (Nginx + Varnish + Apache) 3 | supported_packages: 4 | magento/project-community-edition: '>=2.4.5-p3 <2.4.5-p6' 5 | magento/project-enterprise-edition: '>=2.4.5-p3 <2.4.5-p6' 6 | magento/product-community-edition: '>=2.4.5-p3 <2.4.5-p6' 7 | magento/product-enterprise-edition: '>=2.4.5-p3 <2.4.5-p6' 8 | parameters: 9 | environment: 'prod' 10 | mysql_root_random_password: '' 11 | mysql_database: magento_db 12 | mysql_user: magento_user 13 | mysql_random_password: '' 14 | composition: 15 | required: 16 | nginx: 17 | nginx_latest: 18 | service: dv_nginx_proxy_for_varnish 19 | varnish: 20 | varnish_7_3: 21 | service: dv_varnish_magento 22 | parameters: 23 | # docker-compose service name goes here 24 | backend_host: php 25 | # Config path: full_page_cache/default/grace_period 26 | grace_period: 300 27 | # Config path: web/secure/offloader_header. Changed to `X-Forwarded-Proto` since Magento 2.1 28 | ssl_offloaded_header: 'X-Forwarded-Proto' 29 | # Use `/pub/health_check.php` in case the web root equals to the project root 30 | health_check: '/health_check.php' 31 | varnish_version: 7.3-alpine 32 | # Actually used for Nginx service 33 | varnish_port: 80 34 | apache: 35 | php_8_1_apache: 36 | service: dv_php_apache_unsecure 37 | dev_tools: 38 | - php_apache_development_image 39 | - mailhog 40 | parameters: 41 | composer_version: 2 42 | php_version: '8.1.27' 43 | web_root: 'pub/' 44 | php_7_4_apache: 45 | service: dv_php_apache_unsecure 46 | dev_tools: 47 | - php_apache_development_image 48 | - mailhog 49 | parameters: 50 | composer_version: 2 51 | php_version: '7.4.33' 52 | web_root: 'pub/' 53 | database: 54 | mysql_8_0_persistent: 55 | service: dv_mysql_8_0 56 | dev_tools: phpmyadmin 57 | parameters: 58 | mysql_version: '8.0.28' 59 | mariadb_10_4_persistent: 60 | service: dv_mariadb_10_2_and_above 61 | dev_tools: phpmyadmin 62 | parameters: 63 | mariadb_version: '10.4' 64 | elasticsearch: 65 | elasticsearch_7_17_20_persistent: 66 | service: dv_elasticsearch 67 | parameters: 68 | elasticsearch_version: '7.17.20' 69 | 70 | optional: 71 | redis: 72 | redis_6_2: 73 | service: dv_redis 74 | parameters: 75 | redis_version: '6.2' -------------------------------------------------------------------------------- /src/Shell/Env.php: -------------------------------------------------------------------------------- 1 | getEnv(self::ENV_PROJECTS_ROOT_DIR); 42 | } catch (EnvironmentVariableMissedException) { 43 | $projectsRootDir = $this->getEnv(self::PROJECTS_ROOT_DIR); 44 | } 45 | 46 | return realpath($projectsRootDir) . DIRECTORY_SEPARATOR; 47 | } 48 | 49 | /** 50 | * @return string 51 | */ 52 | public function getSslCertificatesDir(): string 53 | { 54 | try { 55 | $sslCertificatesDir = $this->getEnv(self::ENV_SSL_CERTIFICATES_DIR); 56 | } catch (EnvironmentVariableMissedException) { 57 | $sslCertificatesDir = $this->getEnv(self::SSL_CERTIFICATES_DIR); 58 | } 59 | 60 | return realpath($sslCertificatesDir) . DIRECTORY_SEPARATOR; 61 | } 62 | 63 | /** 64 | * @return string 65 | */ 66 | public function getTraefikSslConfigurationFile(): string 67 | { 68 | try { 69 | return $this->getEnv(self::ENV_TRAEFIK_SSL_CONFIGURATION_FILE); 70 | } catch (EnvironmentVariableMissedException) { 71 | return $this->getEnv(self::TRAEFIK_SSL_CONFIGURATION_FILE); 72 | } 73 | } 74 | 75 | /** 76 | * @param string $variable 77 | * @return string 78 | */ 79 | public function getEnv(string $variable): string 80 | { 81 | $envVariableValue = getenv($variable); 82 | 83 | if ($envVariableValue === false) { 84 | throw new EnvironmentVariableMissedException("Environment variable $variable is not available"); 85 | } 86 | 87 | return $envVariableValue; 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /templates/vendor/defaultvalue/dockerizer-templates/composition/magento/magento_2.4.4_nginx_varnish_apache_p0_p2.yaml: -------------------------------------------------------------------------------- 1 | app: 2 | description: Magento 2.4.4 - 2.2.4-p2 (Nginx + Varnish + Apache) 3 | supported_packages: 4 | magento/project-community-edition: '>=2.4.4 <2.4.4-p3' 5 | magento/project-enterprise-edition: '>=2.4.4 <2.4.4-p3' 6 | magento/product-community-edition: '>=2.4.4 <2.4.4-p3' 7 | magento/product-enterprise-edition: '>=2.4.4 <2.4.4-p3' 8 | parameters: 9 | environment: 'prod' 10 | mysql_root_random_password: '' 11 | mysql_database: magento_db 12 | mysql_user: magento_user 13 | mysql_random_password: '' 14 | composition: 15 | required: 16 | nginx: 17 | nginx_latest: 18 | service: dv_nginx_proxy_for_varnish 19 | varnish: 20 | varnish_7_0: 21 | service: dv_varnish_magento 22 | parameters: 23 | # docker-compose service name goes here 24 | backend_host: php 25 | # Config path: full_page_cache/default/grace_period 26 | grace_period: 300 27 | # Config path: web/secure/offloader_header. Changed to `X-Forwarded-Proto` since Magento 2.1 28 | ssl_offloaded_header: 'X-Forwarded-Proto' 29 | # Use `/pub/health_check.php` in case the web root equals to the project root 30 | health_check: '/health_check.php' 31 | varnish_version: 7.0-alpine 32 | # Actually used for Nginx service 33 | varnish_port: 80 34 | apache: 35 | # 2.4.4 is stable with PHP 7.4 and does not work fine with PHP 8.1! Official system reqs are not correct! 36 | php_8_1_apache: 37 | service: dv_php_apache_unsecure 38 | dev_tools: 39 | - php_apache_development_image 40 | - mailhog 41 | parameters: 42 | composer_version: 2 43 | php_version: '8.1.27' 44 | web_root: 'pub/' 45 | php_7_4_apache: 46 | service: dv_php_apache_unsecure 47 | dev_tools: 48 | - php_apache_development_image 49 | - mailhog 50 | parameters: 51 | composer_version: 2 52 | php_version: '7.4.33' 53 | web_root: 'pub/' 54 | database: 55 | mysql_8_0_persistent: 56 | service: dv_mysql_8_0 57 | dev_tools: phpmyadmin 58 | parameters: 59 | mysql_version: '8.0.28' 60 | mariadb_10_4_persistent: 61 | service: dv_mariadb_10_2_and_above 62 | dev_tools: phpmyadmin 63 | parameters: 64 | mariadb_version: '10.4' 65 | elasticsearch: 66 | elasticsearch_7_16_3_persistent: 67 | service: dv_elasticsearch 68 | parameters: 69 | elasticsearch_version: '7.16.3' 70 | 71 | optional: 72 | redis: 73 | redis_6_2: 74 | service: dv_redis 75 | parameters: 76 | redis_version: '6.2' -------------------------------------------------------------------------------- /src/Docker/Compose/Collection.php: -------------------------------------------------------------------------------- 1 | filesystem->isDir($this->composition->getDockerizerDirInProject($projectRoot))) { 46 | return $dockerComposeCollection; 47 | } 48 | 49 | $finder = Finder::create()->in($this->composition->getDockerizerDirInProject($projectRoot))->depth(0); 50 | 51 | foreach ($finder->directories() as $dockerizerDir) { 52 | try { 53 | // A primitive way to filter compositions inside the project by some substring - for example, 54 | // environment name if present 55 | if ( 56 | $compositionFilter 57 | && !str_contains($dockerizerDir->getFilename(), $compositionFilter) 58 | ) { 59 | continue; 60 | } 61 | 62 | $dockerComposeCollection[$dockerizerDir->getFilename()] = $this->dockerCompose->initialize( 63 | $dockerizerDir->getRealPath() 64 | ); 65 | } catch (CompositionFilesNotFoundException) { 66 | // Do nothing if the folder does not contain valid files. Maybe this is just some test dir 67 | } 68 | } 69 | 70 | return $dockerComposeCollection; 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /templates/vendor/defaultvalue/dockerizer-templates/composition/magento/magento_2.2_apache.yaml: -------------------------------------------------------------------------------- 1 | app: 2 | description: Magento 2.2.0 - 2.2.11 3 | supported_packages: # get package info from composer.json to validate that template is applied to the correct app version 4 | # Use composer semantic versioning https://getcomposer.org/doc/articles/versions.md 5 | magento/project-community-edition: ~2.2.0 6 | magento/project-enterprise-edition: ~2.2.0 7 | magento/product-community-edition: ~2.2.0 8 | magento/product-enterprise-edition: ~2.2.0 9 | # Global parameters that are passed to every service 10 | parameters: 11 | environment: 'prod' 12 | mysql_root_random_password: '' 13 | mysql_database: magento_db 14 | mysql_user: magento_user 15 | mysql_random_password: '' 16 | composition: 17 | required: 18 | apache: 19 | php_7_1_apache: 20 | # Set runner service name upon the composition in case there are multiple services in the runner's composition 21 | # Otherwise, we do not know where to link other services 22 | service: dv_php_apache 23 | dev_tools: 24 | - php_apache_development_image 25 | - mailhog 26 | # Set default option values. Allows to have pre-defined options 27 | # Also this allows changing them and have a single abstract runner with ability to redefine params (like service versions) 28 | parameters: 29 | composer_version: 1 30 | # All float parameters must be string in order to keep trailing zeroes 31 | php_version: '7.1.33' 32 | # Use `web_root` with containers that are connected to Traefik 33 | web_root: 'pub/' 34 | php_7_0_apache: 35 | service: dv_php_apache 36 | dev_tools: 37 | - php_apache_development_image 38 | - mailhog 39 | parameters: 40 | composer_version: 1 41 | php_version: '7.0.33' 42 | # Use `web_root` with containers that are connected to Traefik 43 | web_root: 'pub/' 44 | database: 45 | mysql_5_7_persistent: 46 | service: dv_mysql_5_6_and_5_7 47 | dev_tools: phpmyadmin 48 | parameters: 49 | mysql_version: '5.7' 50 | mysql_5_6_persistent: 51 | service: dv_mysql_5_6_and_5_7 52 | dev_tools: phpmyadmin 53 | parameters: 54 | mysql_version: '5.6' 55 | mariadb_10_2_persistent: 56 | service: dv_mariadb_10_2_and_above 57 | dev_tools: phpmyadmin 58 | parameters: 59 | mariadb_version: '10.2' 60 | mariadb_10_1_persistent: 61 | service: dv_mariadb_10_1 62 | dev_tools: phpmyadmin 63 | parameters: 64 | mariadb_version: '10.1' 65 | 66 | optional: 67 | redis: 68 | redis_5_0: 69 | service: dv_redis 70 | parameters: 71 | redis_version: '5.0' 72 | # @TODO: what about cron jobs service? -------------------------------------------------------------------------------- /src/Docker/Network.php: -------------------------------------------------------------------------------- 1 | 22 | */ 23 | public function ls(): array 24 | { 25 | $networks = trim($this->shell->run( 26 | ['docker', 'network', 'ls', '--format', '{{.ID}} {{.Name}}'] 27 | )->getOutput()); 28 | $result = []; 29 | 30 | foreach (explode(PHP_EOL, $networks) as $network) { 31 | [$id, $name] = explode(' ', $network); 32 | $result[$id] = $name; 33 | } 34 | 35 | return $result; 36 | } 37 | 38 | /** 39 | * @param string $networkName 40 | * @return void 41 | * @throws ProcessFailedException 42 | */ 43 | public function rm(string $networkName): void 44 | { 45 | $this->shell->mustRun( 46 | ['docker', 'network', 'rm', $networkName] 47 | ); 48 | } 49 | 50 | /** 51 | * @param string $network 52 | * @param string $format 53 | * @return string 54 | */ 55 | public function inspect(string $network, string $format): string 56 | { 57 | $process = $this->shell->mustRun( 58 | ['docker', 'network', 'inspect', '--format', $format, $network] 59 | ); 60 | 61 | return trim($process->getOutput()); 62 | } 63 | 64 | /** 65 | * @param string $network 66 | * @param string $format 67 | * @return array 68 | * @throws \JsonException 69 | * @throws ProcessFailedException 70 | */ 71 | public function inspectJsonWithDecode(string $network, string $format = ''): array 72 | { 73 | return json_decode($this->inspect($network, $format), true, 512, JSON_THROW_ON_ERROR); 74 | } 75 | 76 | /** 77 | * @param string $network - Either network name or ID 78 | * @param string $containerName 79 | * @return void 80 | */ 81 | public function connect(string $network, string $containerName): void 82 | { 83 | $this->shell->mustRun( 84 | ['docker', 'network', 'connect', $network, $containerName] 85 | ); 86 | } 87 | 88 | /** 89 | * @param string $network - Either network name or ID 90 | * @param string $containerName 91 | * @return void 92 | */ 93 | public function disconnect(string $network, string $containerName): void 94 | { 95 | $this->shell->mustRun( 96 | ['docker', 'network', 'disconnect', $network, $containerName] 97 | ); 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /src/Filesystem/ProcessibleFile/AbstractFileCollection.php: -------------------------------------------------------------------------------- 1 | items)) { 49 | return $this->items; 50 | } 51 | 52 | $dir = $this->dockerizerRootDir . $this->dirToScan; 53 | $this->items = []; 54 | 55 | foreach (Finder::create()->in($dir)->files()->name(['*.yaml', '*.yml']) as $fileInfo) { 56 | /** @var Template|Service|DevTools $file */ 57 | $file = $this->factory->get(static::PROCESSABLE_FILE_INSTANCE); 58 | $file->init($fileInfo); 59 | $this->items[$file->getCode()] = $file; 60 | } 61 | 62 | ksort($this->items); 63 | 64 | return $this->items; 65 | } 66 | 67 | /**+ 68 | * @return \Traversable 69 | */ 70 | public function getIterator(): \Traversable 71 | { 72 | return new \ArrayIterator($this->getItems()); 73 | } 74 | 75 | /** 76 | * @return string[] 77 | */ 78 | public function getCodes(): array 79 | { 80 | return array_keys($this->getItems()); 81 | } 82 | 83 | /** 84 | * @param string $code 85 | * @return Template|Service|DevTools 86 | */ 87 | public function getByCode(string $code): Template|Service|DevTools 88 | { 89 | if (!isset($this->getItems()[$code])) { 90 | throw new \InvalidArgumentException("File with name `$code` (without extension) does not exist"); 91 | } 92 | 93 | return $this->getItems()[$code]; 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /src/Console/Command/Composition/GetContainerName.php: -------------------------------------------------------------------------------- 1 | setDescription('Get Docker container name by service name in docker-compose*.yaml') 43 | ->addArgument( 44 | 'service-name', 45 | InputArgument::REQUIRED, 46 | 'Service name' 47 | ) 48 | ->addArgument( 49 | 'path', 50 | InputArgument::OPTIONAL, 51 | 'Path to docker-compose files' 52 | ) 53 | ->setHelp(<<<'EOF' 54 | Run %command.name% return Docker container name for the given running service 55 | within any composition. This is especially useful for creating shell aliases. 56 | 57 | Simple usage: 58 | 59 | php %command.full_name% php 60 | EOF); 61 | 62 | parent::configure(); 63 | } 64 | 65 | /** 66 | * @param ArgvInput $input 67 | * @param OutputInterface $output 68 | * @return int 69 | * @throws \Exception 70 | */ 71 | protected function execute(InputInterface $input, OutputInterface $output): int 72 | { 73 | $service = $input->getArgument('service-name'); 74 | $pathToDockerComposeFiles = $input->getArgument('path') ?: getcwd(); 75 | $dockerCompose = $this->dockerCompose->initialize($pathToDockerComposeFiles); 76 | $containerName = $dockerCompose->getServiceContainerName($service); 77 | 78 | // Set normal verbosity to output result 79 | $output->setVerbosity($output::VERBOSITY_NORMAL); 80 | $output->write($containerName); 81 | 82 | return self::SUCCESS; 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /src/Kernel.php: -------------------------------------------------------------------------------- 1 | initEnv(); 32 | $containerBuilder = $this->boot($configDirectories); 33 | /** @var CommandLoaderInterface $commandLoader */ 34 | $commandLoader = $containerBuilder->get('console.command_loader'); 35 | 36 | $application = new Application(); 37 | $application->setCommandLoader($commandLoader); 38 | // @TODO: may be needed to get exception info for parallel runs 39 | // $application->setCatchExceptions(false); 40 | 41 | return $application; 42 | } 43 | 44 | /** 45 | * @return void 46 | */ 47 | private function initEnv(): void 48 | { 49 | $dotenv = new Dotenv(); 50 | $dotenv->usePutenv(); 51 | $dotenv->load(__DIR__ . '/../.env.dist'); 52 | 53 | if (is_file(__DIR__ . '/../.env.local')) { 54 | $dotenv->load(__DIR__ . '/../.env.local'); 55 | } 56 | } 57 | 58 | /** 59 | * @param array $configDirectories 60 | * @return ContainerBuilder 61 | * @throws \Exception 62 | */ 63 | private function boot(array $configDirectories): ContainerBuilder 64 | { 65 | $fileLocator = new FileLocator($configDirectories); 66 | 67 | $containerBuilder = $this->getContainerBuilder(); 68 | $yamlFileLoader = new YamlFileLoader($containerBuilder, $fileLocator); 69 | $yamlFileLoader->load('services.yaml'); 70 | 71 | $containerBuilder->addCompilerPass(new AddConsoleCommandPass()); 72 | $containerBuilder->setParameter('kernel.project_dir', dirname(__DIR__) . DIRECTORY_SEPARATOR); 73 | $containerBuilder->compile(); 74 | 75 | return $containerBuilder; 76 | } 77 | 78 | /** 79 | * @return ContainerBuilder 80 | */ 81 | private function getContainerBuilder(): ContainerBuilder 82 | { 83 | self::$containerBuilder ??= new ContainerBuilder(); 84 | 85 | return self::$containerBuilder; 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /templates/vendor/defaultvalue/dockerizer-templates/composition/magento/magento_2.3.3_apache.yaml: -------------------------------------------------------------------------------- 1 | app: 2 | description: Magento 2.3.3 3 | supported_packages: # get package info from composer.json to validate that template is applied to the correct app version 4 | # Use composer semantic versioning https://getcomposer.org/doc/articles/versions.md 5 | magento/project-community-edition: '>=2.3.3 <2.3.4' 6 | magento/project-enterprise-edition: '>=2.3.3 <2.3.4' 7 | magento/product-community-edition: '>=2.3.3 <2.3.4' 8 | magento/product-enterprise-edition: '>=2.3.3 <2.3.4' 9 | # Global parameters that are passed to every service 10 | parameters: 11 | environment: 'prod' 12 | mysql_root_random_password: '' 13 | mysql_database: magento_db 14 | mysql_user: magento_user 15 | mysql_random_password: '' 16 | composition: 17 | required: 18 | apache: 19 | php_7_3_apache: 20 | service: dv_php_apache 21 | dev_tools: 22 | - php_apache_development_image 23 | - mailhog 24 | parameters: 25 | composer_version: 1 26 | php_version: '7.3.33' 27 | web_root: 'pub/' 28 | php_7_2_apache: 29 | service: dv_php_apache 30 | dev_tools: 31 | - php_apache_development_image 32 | - mailhog 33 | parameters: 34 | composer_version: 1 35 | php_version: '7.2.34' 36 | web_root: 'pub/' 37 | # Not recommended, because 3G may not be enough to install dependencies 38 | php_7_1_apache: 39 | service: dv_php_apache 40 | dev_tools: 41 | - php_apache_development_image 42 | - mailhog 43 | parameters: 44 | composer_version: 1 45 | php_version: '7.1.33' 46 | web_root: 'pub/' 47 | database: 48 | mysql_5_7_persistent: 49 | service: dv_mysql_5_6_and_5_7 50 | dev_tools: phpmyadmin 51 | parameters: 52 | mysql_version: '5.7' 53 | mysql_5_6_persistent: 54 | service: dv_mysql_5_6_and_5_7 55 | dev_tools: phpmyadmin 56 | parameters: 57 | mysql_version: '5.6' 58 | mariadb_10_2_persistent: 59 | service: dv_mariadb_10_2_and_above 60 | dev_tools: phpmyadmin 61 | parameters: 62 | mariadb_version: '10.2' 63 | mariadb_10_1_persistent: 64 | service: dv_mariadb_10_1 65 | dev_tools: phpmyadmin 66 | parameters: 67 | mariadb_version: '10.1' 68 | 69 | optional: 70 | redis: 71 | redis_5_0: 72 | service: dv_redis 73 | parameters: 74 | redis_version: '5.0' 75 | elasticsearch: 76 | elasticsearch_5_6_16_persistent: 77 | service: dv_elasticsearch 78 | parameters: 79 | elasticsearch_version: '5.6.16-alpine' 80 | elasticsearch_6_8_23_persistent: 81 | service: dv_elasticsearch 82 | parameters: 83 | elasticsearch_version: '6.8.23' 84 | # @TODO: what about cron jobs service? -------------------------------------------------------------------------------- /templates/vendor/defaultvalue/dockerizer-templates/composition/magento/magento_2.1_apache.yaml: -------------------------------------------------------------------------------- 1 | app: 2 | description: Magento 2.1.0 - 2.1.18 3 | supported_packages: # get package info from composer.json to validate that template is applied to the correct app version 4 | # Use composer semantic versioning https://getcomposer.org/doc/articles/versions.md 5 | magento/project-community-edition: ~2.1.0 6 | magento/project-enterprise-edition: ~2.1.0 7 | magento/product-community-edition: ~2.1.0 8 | magento/product-enterprise-edition: ~2.1.0 9 | # Global parameters that are passed to every service 10 | parameters: 11 | environment: 'prod' 12 | mysql_root_random_password: '' 13 | mysql_database: magento_db 14 | mysql_user: magento_user 15 | mysql_random_password: '' 16 | composition: 17 | required: 18 | apache: 19 | php_7_0_apache: 20 | # Set runner service name upon the composition in case there are multiple services in the runner's composition 21 | # Otherwise, we do not know where to link other services 22 | service: dv_php_apache 23 | dev_tools: 24 | - php_apache_development_image 25 | - mailhog 26 | # Set default option values. Allows to have pre-defined options 27 | # Also this allows changing them and have a single abstract runner with ability to redefine params (like service versions) 28 | parameters: 29 | composer_version: 1 30 | # All float parameters must be string in order to keep trailing zeroes 31 | php_version: '7.0.33' 32 | # Use `web_root` with containers that are connected to Traefik 33 | web_root: 'pub/' 34 | # Highly not recommended to install Magento due to memory limit violation. But can ise for existing projects 35 | php_5_6_apache: 36 | service: dv_php_apache 37 | dev_tools: 38 | - php_apache_development_image 39 | - mailhog 40 | parameters: 41 | composer_version: 1 42 | php_version: '5.6.40' 43 | # Use `web_root` with containers that are connected to Traefik 44 | web_root: 'pub/' 45 | database: 46 | mysql_5_7_persistent: 47 | service: dv_mysql_5_6_and_5_7 48 | dev_tools: phpmyadmin 49 | parameters: 50 | mysql_version: '5.7' 51 | mysql_5_6_persistent: 52 | service: dv_mysql_5_6_and_5_7 53 | dev_tools: phpmyadmin 54 | parameters: 55 | mysql_version: '5.6' 56 | mariadb_10_2_persistent: 57 | service: dv_mariadb_10_2_and_above 58 | dev_tools: phpmyadmin 59 | parameters: 60 | mariadb_version: '10.2' 61 | mariadb_10_1_persistent: 62 | service: dv_mariadb_10_1 63 | dev_tools: phpmyadmin 64 | parameters: 65 | mariadb_version: '10.1' 66 | 67 | optional: 68 | redis: 69 | redis_5_0: 70 | service: dv_redis 71 | parameters: 72 | redis_version: '5.0' 73 | # @TODO: what about cron jobs service? --------------------------------------------------------------------------------