Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / 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 / 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"
version: '3.7'
services:
traefik:
image: traefik:v2.1.1
container_name: "${PREFIX}-traefik"
restart: unless-stopped
security_opt:
- no-new-privileges:true