Skip to content

Instantly share code, notes, and snippets.

@rfay
rfay / convert-old-db.sh
Created Aug 18, 2022
Convert a pre-v1.19.0 in-volume database marker to current usage
View convert-old-db.sh
#!/bin/bash
# convert the marker on an old pre-ddev v1.19 database to current usage
# See issue at https://github.com/drud/ddev/issues/4129
# First argument should be the project name
# Second argument is the correct value you want, for example,
# mariadb_10.2 or mysql_8.0
# Example: bash convert-old-db.sh fe-kuerschnersmart mariadb_10.2
if [ $# != 2 ]; then
@rfay
rfay / nginx-site.conf
Last active Jun 30, 2022
Put drupal in a subdirectory - ddev + nginx
View nginx-site.conf
# ddev drupal9 config
server {
listen 80 default_server;
listen 443 ssl default_server;
root /var/www/html/maresmuseum/web;
ssl_certificate /etc/ssl/certs/master.crt;
ssl_certificate_key /etc/ssl/certs/master.key;
@rfay
rfay / failure.txt
Created May 10, 2022
Failure installing dd-ext:0.5.2
View failure.txt
PS C:\WINDOWS\system32> docker extension install slimdotai/dd-ext:0.5.2
Extensions can install binaries, invoke commands and access files on your machine.
Are you sure you want to continue? [y/N] y
Installing new extension "slimdotai/dd-ext:0.5.2"
Installing service in Desktop VM...
Setting additional compose attributes
VM service started
executing 'docker cp d38acd41dae136949c71353d021d98aa6dbb801f6f67579b87f798746097f542:/codi.svg C:\Users\randy\AppData\Roaming\Docker\extensions\slimdotai_dd-ext\codi.svg' : exit status 1:
Error response from daemon: i/o timeout
Removing extension slimdotai/dd-ext:0.5.2...
@rfay
rfay / Dockerfile
Created May 10, 2022
DDEV: Build xdebug from scratch
View Dockerfile
ARG BASE_IMAGE
FROM $BASE_IMAGE
ENV PHP_TAG=7.4.29
# May want to install php7.4-dev to find out config arguments with `php-config`
#RUN git clone https://github.com/php/php-src.git && cd php-src && git checkout php-$PHP_TAG && ./buildconf --force
#RUN ./configure --includedir=/usr/include --mandir=/usr/share/man --infodir=/usr/share/info --disable-option-checking --disable-silent-rules --libdir=/usr/lib/x86_64-linux-gnu --libexecdir=/usr/lib/x86_64-linux-gnu --disable-maintainer-mode --disable-dependency-tracking --prefix=/usr --enable-cli --disable-cgi --disable-phpdbg --with-config-file-path=/etc/php/7.4/cli --with-config-file-scan-dir=/etc/php/7.4/cli/conf.d --build=x86_64-linux-gnu --host=x86_64-linux-gnu --config-cache --cache-file=/build/php7.4-7.4.29/config.cache --libdir=${prefix}/lib/php --libexecdir=${prefix}/lib/php --datadir=${prefix}/share/php/7.4 --program-suffix=7.4 --sysconfdir=/etc --localstatedir=/var --mandir=/usr/share/man --disable-all --disable-debug --disable-rpath --disable-static --wi
View v1.18.2-AdditionalConfiguration.php
<?php
/**
* #ddev-generated: Automatically generated TYPO3 AdditionalConfiguration.php file.
* ddev manages this file and may delete or overwrite the file unless this comment is removed.
* It is recommended that you leave this file alone.
*/
if (getenv('IS_DDEV_PROJECT') == 'true') {
$GLOBALS['TYPO3_CONF_VARS'] = array_replace_recursive(
@rfay
rfay / Dockerfile
Created Mar 16, 2022
Updated healthcheck.sh and other files for mailhog with basic auth
View Dockerfile
ARG BASE_IMAGE
FROM $BASE_IMAGE
ADD mailhog-auth.txt /etc
ADD mailhog.conf /etc/supervisor/conf.d
ADD healthcheck.sh /
@rfay
rfay / DiscordSignupTrouble.md
Last active Jan 18, 2022
Discord signup trouble
View DiscordSignupTrouble.md

From James Wilson in slack

Okay. I’ve figured this out… very confusing.

  1. Had to go to discord.com first and click “login”. (Somehow my user account was logged out but there was no indication of this on the invite link… it just said “accept invite”).
  2. On providing valid email and password creds, it gave me an error message about logging in from a new location, and to “check e-mail” (when i read this last week I didn’t understand that it meant I needed to actually check my inbox for an authorization link).
  3. Clicked the auth link sent via email, which sent me to a page that let me authorize my current ip address.
  4. Logged in again with email address and password.
  5. Clicked the Ddev Discord invite link. It worked. I’m in.
@rfay
rfay / ddevtest.txt
Created Dec 25, 2021
ddev test junk left laying around
View ddevtest.txt
0B TestCmdDescribeMissingProjectDirectory1232390035
0B TestCmdDescribeMissingProjectDirectory1438195926
0B TestCmdDescribeMissingProjectDirectory1463459776
0B TestCmdDescribeMissingProjectDirectory1690941594
0B TestCmdDescribeMissingProjectDirectory1763872614
0B TestCmdDescribeMissingProjectDirectory1804645898
0B TestCmdDescribeMissingProjectDirectory2042833100
0B TestCmdDescribeMissingProjectDirectory2168283453
0B TestCmdDescribeMissingProjectDirectory2214098906
0B TestCmdDescribeMissingProjectDirectory2610779251
@rfay
rfay / docker-compose.mercure.yaml
Created Aug 31, 2021
Experimental mercure for ddev
View docker-compose.mercure.yaml
version: "3.6"
services:
mercure:
# Name of container using standard ddev convention
container_name: ddev-${DDEV_SITENAME}-mercure
labels:
com.ddev.site-name: ${DDEV_SITENAME}
com.ddev.approot: $DDEV_APPROOT
image: dunglas/mercure