Skip to content

Instantly share code, notes, and snippets.

View fhuitelec's full-sized avatar

Fabien Huitelec fhuitelec

View GitHub Profile

Keybase proof

I hereby claim:

  • I am fhuitelec on github.
  • I am fhuitelec (https://keybase.io/fhuitelec) on keybase.
  • I have a public key whose fingerprint is AE2A BBF8 CF68 6E9C 0845 18DE 7351 71D1 0D1B B535

To claim this, I am signing this object:

@fhuitelec
fhuitelec / Tiltfile
Last active February 24, 2021 22:19
Workaround for tilt's docker_compose() and complex compose stacks - https://github.com/tilt-dev/tilt/issues/3393
def _probe_for(container):
"""Simulate a healthcheck using:
- container's running status
- container's health if it exists
Needs jq installed locally
:type container: str
:rtype: Probe
"""
@fhuitelec
fhuitelec / 0--values.yaml
Last active July 17, 2019 07:48
Medium - Traefik as an ingress controller on minikube with kustomize & helm
# Cf. https://github.com/helm/charts/blob/master/stable/traefik/values.yaml
rbac:
enabled: true
dashboard:
enabled: true
domain: traefik.local.minikube.com
serviceType: NodePort
serviceType: NodePort
@fhuitelec
fhuitelec / medium-build-artifact.right-nginx.conf
Created July 16, 2018 06:48
Medium article - PHP-FPM/NGINX one build artifact - right conf
server {
// [...]
location ~ ^/index\.php(/|$) {
// [...]
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
internal;
}
}
@fhuitelec
fhuitelec / medium-build-artifact.bad-nginx.conf
Last active July 16, 2018 06:47
Medium article - PHP-FPM/NGINX one build artifact - bad conf
server {
server_name domain.tld www.domain.tld;
root /var/www/project/public;
location / {
try_files $uri /index.php$is_args$args;
}
location ~ ^/index\.php(/|$) {
fastcgi_pass php-fpm:9000; # application being the DNS to reach the php-fpm upstream
@fhuitelec
fhuitelec / .00-README.md
Last active January 4, 2018 14:47
[Bootstrap simple xdebug dev stack] #php #debug #docker #makefile

Getting started

Initialization

  1. Copy docker-compose .env file
cp .env.dist .env
  1. Create alias interface (tested on macOS only)
@fhuitelec
fhuitelec / .env.dist
Last active January 4, 2018 14:34
[Makefile skeleton] #makefile #skeleton #php
PHP_VERSION=7.1
PROJECT_NAME="Your project name here"
FORMATTED_PROJECT_NAME=your-project-name-here
@fhuitelec
fhuitelec / Makefile
Last active January 3, 2018 15:06
[Bootstrap PHPUnit] #docker #php #unittests #makefile
# ######### #
# VARIABLES #
# ######### #
export PHP_VERSION = 7.1
export PROJECT_NAME = your-project-name
# ####### #
# TARGETS #
# ####### #
@fhuitelec
fhuitelec / Makefile
Last active January 3, 2018 09:22
[SF Flex docker container] Run a dedicated composer container with Flex #docker #symfony #flex #php
export COMPOSER_COMPOSE_EXEC = docker-compose -f composer.docker-compose.yaml
.PHONY: composer
composer:
$(COMPOSER_COMPOSE_EXEC) run --rm composer
@fhuitelec
fhuitelec / check_argument_is_provided.zsh
Created November 25, 2017 23:48
[Check argument is provided] #zsh #cheatsheet
#!/usr/bin/env zsh
#
# Check argument is provided
#
if [ -n "$1" ]; then
echo "Command must have one argument" >&2
exit 1
fi