Skip to content
This repository has been archived by the owner on Aug 8, 2024. It is now read-only.

Add basic Tugboat configuration #25

Merged
merged 1 commit into from
Apr 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .tugboat/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# https://docs.tugboatqa.com/reference/tugboat-configuration/
# https://docs.tugboatqa.com/starter-configs/tutorials/drupal-10/
services:
webserver:
image: tugboatqa/php:8.3-apache
default: true
commands:
init:
- docker-php-ext-install opcache
- a2enmod headers rewrite
- echo "memory_limit = -1" >> /usr/local/etc/php/conf.d/my-php.ini
- ln -snf "${TUGBOAT_ROOT}/web" "${DOCROOT}"
build:
- composer install
- composer run drupal:install
TravisCarden marked this conversation as resolved.
Show resolved Hide resolved

# Make sure files and translations folders exist and are writable.
- mkdir -p "${DOCROOT}/sites/default/files/translations"
- chgrp -R www-data "${DOCROOT}/sites/default/files"
- find "${DOCROOT}/sites/default/files" -type d -exec chmod 2775 {} \;
- find "${DOCROOT}/sites/default/files" -type f -exec chmod 0664 {} \;

# Enable verbose error logging (debug mode).
- ./vendor/bin/drush config:set --yes system.logging error_level verbose
- ./vendor/bin/drush config:get system.logging error_level

# @todo The above Drush command doesn't ultimately take effect
# for some reason. Manually change the settings until it can
# be debugged.
- |
echo "if (file_exists(__DIR__ . '/settings.local.php')) {
include __DIR__ . '/settings.local.php';
}" | sudo tee -a web/sites/default/settings.php
sudo cp web/sites/example.settings.local.php \
web/sites/default/settings.local.php

# Make everything writable.
- sudo chmod -R 777 "${DOCROOT}"