Skip to content
Snippets Groups Projects
Commit 0644c262 authored by Fabian Bircher's avatar Fabian Bircher
Browse files

Switch to ddev for local development

parent 25aa693c
Branches 8.x-1.x
Tags 8.x-1.10
No related merge requests found
Pipeline #421998 failed
......@@ -4,19 +4,8 @@ docker-relay:
version: 0.1.0
drush:
container: drupal
container: web
cmd: 'vendor/bin/drush'
user: 1000
composer:
container: drupal
cmd: composer
user: 1000
# This is a hack and will be done differently in future versions of docker-relay.
exec: ['docker-compose', 'run', '--rm', '-u', '1000', 'drupal', 'composer']
php:
container: drupal
path: '.'
cmd: php
user: 1000
container: web
[PHP]
variables_order = GPCS
error_reporting = E_ALL
date.timezone = "UTC"
sendmail_path = "true"
# This file is for customizing the Docker environment which is used to develop
# Devel. If you are just using Devel on a site, you may ignore this file
# and docker-compose.yml.
# Uncomment to change versions of php and DBs and OS.
# POSTGRES_TAG=10.5
# MARIADB_TAG=10.3
# PHP_TAG=7.3-dev
# Uncomment to run tests against a different DB. Defaults to mysql.
# SIMPLETEST_DB=sqlite://localhost/sites/default/files/.sqlite
# SIMPLETEST_DB=mysql://root:password@mariadb/db
# SIMPLETEST_DB=pgsql://root:password@postgres/db
# XDebug defaults to Off in the php container.
# Uncomment to enable XDebug. See https://wodby.com/docs/1.0/stacks/drupal/local/#xdebug.
# When Xdebug first successfully connects back to PHPStorm, you are prompted to create a Server called devel
# Then you are prompted to add path mappings (its mandatory).
# PHP_XDEBUG=0
# PHP_XDEBUG_DEFAULT_ENABLE=0
# PHP_IDE_CONFIG=serverName=devel
# PHP_XDEBUG_REMOTE_HOST=host.docker.internal
# PHP_XDEBUG_REMOTE_CONNECT_BACK=0
......@@ -19,29 +19,32 @@
*.config text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.css text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.dist text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.engine text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
*.engine text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php linguist-language=php
*.html text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=html
*.inc text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
*.install text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
*.inc text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php linguist-language=php
*.install text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php linguist-language=php
*.js text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.json text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.lock text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.map text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.md text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.module text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
*.php text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
*.module text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php linguist-language=php
*.php text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php linguist-language=php
*.po text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.profile text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
*.profile text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php linguist-language=php
*.script text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.sh text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
*.sh text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php linguist-language=php
*.sql text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.svg text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.theme text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
*.theme text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php linguist-language=php
*.twig text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.txt text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.xml text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
*.yml text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
# PHPStan's baseline uses tabs instead of spaces.
core/.phpstan-baseline.php text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tabwidth=2 diff=php linguist-language=php
# Define binary file attributes.
# - Do not treat them as text.
# - Include binary diff in patches instead of "binary files differ."
......@@ -59,15 +62,3 @@
*.ttf -text diff
*.woff -text diff
*.woff2 -text diff
# Config Split settings for preventing scaffolding assets from being packaged.
.docker/ export-ignore
.docker-relay.yml export-ignore
.env.dist export-ignore
.gitattributes export-ignore
.gitignore export-ignore
docker-compose.yml export-ignore
grumphp.yml export-ignore
phpcs.xml.dist export-ignore
phpstan.neon export-ignore
phpunit.xml.dist export-ignore
......@@ -27,6 +27,9 @@
"require": {
"drupal/config_filter": "^1"
},
"require-dev": {
"drush/drush": "*"
},
"conflict": {
"drupal/console": "<1.3.2"
},
......
......@@ -4,6 +4,7 @@ entity.config_split.enable:
_controller: '\Drupal\config_split\Controller\ConfigSplitController::enableEntity'
requirements:
_permission: 'administer configuration split'
_csrf_token: 'TRUE'
entity.config_split.disable:
path: '/admin/config/development/configuration/config-split/{config_split}/disable'
......@@ -11,3 +12,4 @@ entity.config_split.disable:
_controller: '\Drupal\config_split\Controller\ConfigSplitController::disableEntity'
requirements:
_permission: 'administer configuration split'
_csrf_token: 'TRUE'
version: "3.1"
services:
# More info at https://github.com/wodby/php
drupal:
image: wodby/php:${PHP_TAG-8.1-dev}
command: composer webserver
environment:
# We set the composer variable so that composer uses the dev file. The drupal CI can not deal with having drupal as a dev-dependency.
COMPOSER: composer.spoons.json
PHP_SENDMAIL_PATH: /dev/null
COLUMNS: ${COLUMNS-80} # Set 80 columns for docker exec -it.
## Read instructions at https://wodby.com/docs/stacks/drupal/local/#debugging-cli-requests
# The line below is commented out because the mere presence of that env variable loads XDebug regardless of the value.
# Enable XDebug when you `up` your container: PHP_XDEBUG=1 docker-compose up -d
# PHP_XDEBUG:
PHP_XDEBUG_DEFAULT_ENABLE:
PHP_IDE_CONFIG:
PHP_XDEBUG_REMOTE_HOST:
PHP_XDEBUG_REMOTE_CONNECT_BACK:
# Specify 'drupal' instead of 127.0.0.1 so that chrome service can reach it.
SIMPLETEST_BASE_URL: http://drupal:8888
SIMPLETEST_DB:
volumes:
- ./:/var/www/html:cached
- ./.docker/zz-php.ini:/usr/local/etc/php/conf.d/zz-php.ini
# ports:
# - '${WEB_PORT-8889}:8888'
# More info at https://github.com/wodby/mariadb
mariadb:
image: wodby/mariadb:${MARIADB_TAG-10.3}
stop_grace_period: 30s
environment:
MYSQL_ROOT_PASSWORD: password
# volumes:
# - mariadb-datavolume:/var/lib/mysql
# ports:
# - '3005:3306'
# More info at https://github.com/wodby/postgres
# postgres:
# image: wodby/postgres:${POSTGRES_TAG-10.5}
# stop_grace_period: 30s
# environment:
# POSTGRES_PASSWORD: password
# POSTGRES_DB: db
# POSTGRES_USER: root
# volumes:
# - postgres-datavolume:/var/lib/postgresql/data
# ports:
# - '5532:5432'
# https://gorannikolovski.com/blog/docker4drupal-and-functional-javascript-tests
# chrome:
# image: drupalci/webdriver-chromedriver:production
# ulimits:
# core:
# soft: -1
# hard: -1
# cap_add:
# - SYS_ADMIN
# volumes:
# - /dev/shm:/dev/shm
# entrypoint:
# - chromedriver
# - "--no-sandbox"
# - "--log-path=/tmp/chromedriver.log"
# - "--verbose"
# - "--whitelisted-ips="
#data volumes https://docs.docker.com/storage/volumes/
#volumes:
# mariadb-datavolume:
# postgres-datavolume:
grumphp:
git_hook_variables:
EXEC_GRUMPHP_COMMAND: ['docker-compose', 'run', '--rm', '--no-deps', 'drupal']
ascii:
succeeded: ~
tasks:
phpcs: ~
phplint: ~
# phpunit: ~
# phpstan: ~
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment