git clone --branch 10.2.4 https://git.drupalcode.org/project/drupal.git public
cp example.gitignore public/.gitignore
docker compose up --wait
docker compose exec app composer install --working-dir=/app/public
docker compose exec app composer require --working-dir=/app/public drush/drush
cp settings.php public/sites/default/settings.php
docker compose exec app /app/public/vendor/bin/drush site:install -y
docker compose exec app /app/public/vendor/bin/drush uli
-
-
Save back-2-95/ab8f16dea7ff2222966613392ee88ce3 to your computer and use it in GitHub Desktop.
Create Drupal contribution setup using Stonehenge
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DRUPAL_HOSTNAME=drupal-contribute.docker.so |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
services: | |
app: | |
container_name: ${COMPOSE_PROJECT_NAME}-app | |
hostname: ${COMPOSE_PROJECT_NAME} | |
image: druidfi/drupal-web:v8.3.4 | |
volumes: | |
- .:/app:delegated | |
environment: | |
APP_ENV: ${APP_ENV:-dev} | |
DRUSH_OPTIONS_URI: https://${DRUPAL_HOSTNAME} | |
PHP_SENDMAIL_PATH: /usr/sbin/sendmail -S host.docker.internal:1025 -t | |
SIMPLETEST_BASE_URL: http://app:8080 | |
SIMPLETEST_DB: mysql://drupal:drupal@db:3306/drupal | |
XDEBUG_ENABLE: ${XDEBUG_ENABLE:-false} | |
labels: | |
- "traefik.enable=true" | |
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}-app.entrypoints=https" | |
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}-app.rule=Host(`${DRUPAL_HOSTNAME}`)" | |
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}-app.tls=true" | |
- "traefik.http.services.${COMPOSE_PROJECT_NAME}-app.loadbalancer.server.port=8080" | |
- "traefik.docker.network=traefik-network" | |
extra_hosts: | |
- "host.docker.internal:host-gateway" | |
networks: | |
- default | |
- traefik-network | |
db: | |
container_name: ${COMPOSE_PROJECT_NAME}-db | |
image: druidfi/mariadb:10.11-drupal-lts | |
ports: | |
- 3306 | |
networks: | |
default: | |
name: ${COMPOSE_PROJECT_NAME} | |
external: false | |
traefik-network: | |
name: stonehenge-network | |
external: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$databases['default']['default'] = [ | |
'database' => getenv('DRUPAL_DB_NAME'), | |
'username' => getenv('DRUPAL_DB_USER'), | |
'password' => getenv('DRUPAL_DB_PASS'), | |
'host' => getenv('DRUPAL_DB_HOST'), | |
'port' => getenv('DRUPAL_DB_PORT'), | |
'driver' => 'mysql', | |
'prefix' => '', | |
'collation' => 'utf8mb4_general_ci', | |
]; | |
$settings['skip_permissions_hardening'] = TRUE; | |
$settings['trusted_host_patterns'][] = '^drupal-contribute.docker.so$'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment