Skip to content

Instantly share code, notes, and snippets.

services:
php:
# image: skilldlabs/php:83-unit-dev
image: skilldlabs/php:84-unit-dev
# command: unitd --no-daemon --user web-user --group web-group --log /dev/stdout
container_name: core
restart: always
working_dir: /var/www/html
volumes:
@andypost
andypost / docker-compose.yaml
Created October 6, 2023 23:52
Drupal 10 core dev
version: "3.4"
services:
php:
# image: drupalci/php-8.2-apache:production
image: skilldlabs/php:82-unit-dev
# image: skilldlabs/php:83-unit-dev
container_name: core
restart: always
@andypost
andypost / gist:bfeb0f21637a0a2463c00151eb429e69
Created September 6, 2023 21:34
Build of unit 1.31.0 using clang16
$ docker run --rm -it -u 0:0 --cap-add=SYS_PTRACE --privileged --platform=linux/aarch64 --network host --pull=always -v /data/nd/aports:/mnt -e APORTSDIR=/mnt -w /mnt --entrypoint='' alpinelinux/alpine-gitlab-ci:latest-aarch64 /bin/ash
latest-aarch64: Pulling from alpinelinux/alpine-gitlab-ci
...
Digest: sha256:b2020e43f7d89e9477823e427ba4b11e48db41b9a2987acf667e1b56d4f767b1
Status: Downloaded newer image for alpinelinux/alpine-gitlab-ci:latest-aarch64
/mnt # cd community/unit
/mnt/community/unit # apk upgrade
fetch https://dl-cdn.alpinelinux.org/alpine/edge/main/aarch64/APKINDEX.tar.gz
(1/2) Upgrading pkgconf (2.0.2-r0 -> 2.0.3-r0)
(2/2) Upgrading nghttp2-libs (1.55.1-r0 -> 1.56.0-r0)
@andypost
andypost / mydate.info.yml
Created December 11, 2021 20:13
Views date fielter plugin alter
name: My date
description: "Overrides core date views filter"
type: module
package: "Views"
core_version_requirement: '>=8.8.0'
@andypost
andypost / Makefile
Created September 1, 2021 13:18
Alpinelinux docker CI images for each arch
.PHONY: run
all: x86_64
IMAGE_ALP=alpinelinux/alpine-gitlab-ci:latest-
builder = docker run --rm -it --network host \
--cap-add=SYS_PTRACE --privileged \
--platform=linux/$(or ${2}, ${1}) \
-v $(shell pwd):/mnt -e APORTSDIR=/mnt -w /mnt \
@andypost
andypost / php-xdebug-2-3.diff
Created October 19, 2020 15:37
php-ini change from xdebug 2 to 3
; XDebug configuration
-xdebug.remote_enable = 1
-xdebug.remote_connect_back = 1
-xdebug.remote_port = 9000
xdebug.max_nesting_level = 2000
-xdebug.profiler_enable = 0
-xdebug.profiler_enable_trigger = 1
-xdebug.profiler_output_dir = "/var/log"
+xdebug.mode=debug
+;xdebug.remote_enable = 1
core9$ make exec0
docker exec -it -u 0:0 core9 ash
/var/www/html/web # apk add php7-xhprof-assets
fetch https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
...
OK: 116 MiB in 111 packages
/var/www/html/web # exit
core9$ make exec
core8$ make t t=modules/masquerade/tests/src/Functional/MasqueradeAccessTest.php
docker exec \
-u 1000:1000 \
-e BROWSERTEST_OUTPUT_DIRECTORY=sites/simpletest/out \
core8 vendor/bin/phpunit -c core/phpunit.xml.dist --colors=always --debug -v \
modules/masquerade/tests/src/Functional/MasqueradeAccessTest.php
PHPUnit 8.5.8 by Sebastian Bergmann and contributors.
Runtime: PHP 7.4.8
Configuration: /var/www/html/web/core/phpunit.xml.dist
aports$ cat Makefile
.PHONY: run
all: run
IMAGE := skilldlabs/aports-build:edge
IMAGE_ALPINE=alpinelinux/docker-abuild
builder=docker run --rm -it --cap-add=SYS_PTRACE -v $(shell pwd):/mnt --network host --entrypoint='' -e APORTSDIR=/mnt -w /mnt $(IMAGE_ALPINE)
run:
backup:git:
variables:
GIT_DEPTH: ""
GIT_STRATEGY: clone
stage: backup
environment: dev
script:
- apk add --no-cache openssh-client
- echo "${GIT_BACKUP_RSA_PUB_KEY}" > ssh_key
- chmod 0600 ssh_key