Skip to content

Instantly share code, notes, and snippets.

version: '3.7'
services:
traefik:
image: traefik:v2.1.1
container_name: "${PREFIX}-traefik"
restart: unless-stopped
security_opt:
- no-new-privileges:true
@back-2-95
back-2-95 / docker-compose.override.yml
Last active July 5, 2020 13:20
Local development support for Traefik v1 and v2 in the same project
version: '3.7'
services:
app:
labels:
# Traefik 2 labels, note that I point to container_name of app service with ${COMPOSE_PROJECT_NAME}-app.
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}-app.entrypoints=https"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}-app.rule=Host(`${APP_HOSTNAME}`)"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}-app.tls=true"
@back-2-95
back-2-95 / gist:fe39495086cdace14d521454451432f7
Created May 7, 2020 05:07
Drupal Rector with Docker image
docker run --rm -it \
-v /path/to/d8-project/vendor:/app/vendor \
-v /path/to/d8-project/public/core:/app/public/core \
-v /path/to/d8-project/public/profiles:/app/public/profiles \
-v /path/to/d8-project/public/modules/contrib/geshifilter:/app/public/modules/contrib/geshifilter \
druidfi/drupal-rector:latest \
bash -c "rector process /app/public/modules/contrib/geshifilter --dry-run"
Rector 0.8.x-dev@8896f0a
Config file: rector.yml
@back-2-95
back-2-95 / wodby.deploy.sh
Last active February 13, 2023 07:09
Wodby Slack notifier
#!/bin/bash
set -e
trap 'catch' EXIT
deploy() {
notify "start"
info "Install dependencies"
composer install --prefer-dist -n --no-dev
@back-2-95
back-2-95 / git_azure.mk
Last active February 5, 2023 07:51
How to sync to other git repository in different system (Azure example)
GIT_REMOTE_AZURE := azure
GIT_REMOTE_AZURE_URL := REPO_IN_AZURE
GIT_REMOTE_AZURE_BRANCH := dev
GIT_REMOTE_AZURE_PUSH_BRANCH := dev-github
PHONY += git-add-remote
git-add-remote: ## Add Azure Git remote
$(call step,Add Azure Git remote...)
git remote add $(GIT_REMOTE_AZURE) $(GIT_REMOTE_AZURE_URL)
@back-2-95
back-2-95 / gist:ef42b2ce2f464cd2ce5bd5fb579ab3ab
Last active April 16, 2021 04:38
Convert Drupal 7 tables to utf8mb4

Go to where ever your drupal webroot is:

$ drush @none dl utf8mb4_convert-7.x
$ cd ~/.drush/utf8mb4_convert
$ wget https://www.drupal.org/files/issues/utf8mb4_convert-skip_converted_tables.patch
$ patch -p1 < utf8mb4_convert-skip_converted_tables.patch
$ cd /back/to/your/drupal/webroot/
$ drush cc drush
$ drush utf8mb4-convert-databases
@back-2-95
back-2-95 / readme.md
Created December 10, 2021 17:48
Use Tailwindcss 3 with Symfony 5/6

Symfony 5/6 and Tailwindcss 3

Requirements

  • symfony/webpack-encore-bundle

Steps

Add Tailwindcss & Friends with Yarn:

@back-2-95
back-2-95 / azure-pipelines.yml
Last active May 13, 2022 11:28
Trigger Lagoon deployment from Azure pipeline
trigger:
branches:
# These must have existing instance on Lagoon
include:
- dev
- qa
- main
pool:
vmImage: 'ubuntu-latest'
@back-2-95
back-2-95 / switch.sh
Created March 6, 2023 07:16
Change Drupal profile with profile switcher
## Drupal profile switcher
composer require 'drupal/profile_switcher:^1.0@alpha'
drush en profile_switcher -y
drush switch:profile minimal
drush pmu profile_switcher -y
composer remove drupal/profile_switcher
drush cr
drush status