Skip to content

Instantly share code, notes, and snippets.

View yuklia's full-sized avatar
🇺🇦

Yuliia Kostrikova yuklia

🇺🇦
View GitHub Profile
@yuklia
yuklia / php-fpm_global
Created December 11, 2019 10:35
php fpm global directive (default)
;;;;;;;;;;;;;;;;;;;;;
; FPM Configuration ;
;;;;;;;;;;;;;;;;;;;;;
; All relative paths in this configuration file are relative to PHP's install
; prefix (/usr/local). This prefix can be dynamically changed by using the
; '-p' argument from the command line.
;;;;;;;;;;;;;;;;;;
; Global Options ;
@yuklia
yuklia / php-fpm_pool
Last active December 11, 2019 10:34
php fpm poll directive (default)
; Start a new pool named 'www'.
; the variable $pool can be used in any directive and will be replaced by the
; pool name ('www' here)
[www]
; Per pool prefix
; It only applies on the following directives:
; - 'access.log'
; - 'slowlog'
; - 'listen' (unixsocket)
Hostname: 6b27211a260c
IP: 127.0.0.1
IP: 10.255.1.59
IP: 172.18.0.13
IP: 10.0.2.65
GET / HTTP/1.1
Host: domain.com
User-Agent: redacted
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3
Accept-Encoding: gzip, deflate
1 # make sure proxyPolicy is disabled. => "BackendServerDescriptions" : []
aws elb describe-load-balancer-policy-types
2 aws elb create-load-balancer-policy --load-balancer-name %lb_name% --policy-name %name% --policy-type-name ProxyProtocolPolicyType --policy-attributes AttributeName=ProxyProtocol,AttributeValue=true
3 aws elb set-load-balancer-policies-for-backend-server --load-balancer-name %lb_name% --instance-port 443 --policy-names %policy_name%
4 check (optional)
aws elb describe-load-balancers --load-balancer-name %lb_name%
debug:
aws elb delete-load-balancer-policy --load-balancer-name %lb_name% --policy-name %policy_name%
#!/bin/bash
curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip" && \
sudo apt install -y unzip python && \
unzip awscli-bundle.zip && \
sudo ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws && \
rm -rv awscli-bundle.zip awscli-bundle/
aws --version
@yuklia
yuklia / docker-compose.yml
Created February 12, 2019 21:47
Traefik with SSL certs Letsencrypt on Docker Swarm
version: '3.4'
services:
traefik:
image: ${REGISTRY}/traefik
build:
context: ./reverse-proxy/
command:
- "--web"
- "--entrypoints=Name:http Address::80 Redirect.EntryPoint:https"
- "--entrypoints=Name:https Address::443 TLS"
@yuklia
yuklia / php-fpm docker service container
Created October 19, 2017 20:39
php-fpm docker service container special for Laravel
FROM php:7-fpm
MAINTAINER yuklia
# upgrade the container
RUN apt-get update && \
apt-get upgrade -y
RUN curl -sL https://deb.nodesource.com/setup_6.x | bash -
@yuklia
yuklia / slow-log config
Created October 19, 2017 20:28
slow-log config
[mysqld]
slow_query_log = 1
slow_query_log_file = /var/log/mysql/mysql-slow.log
long_query_time = 1
@yuklia
yuklia / Docker + Laravel with nginx, php-fpm, mysql
Created October 19, 2017 13:05
Dockerize Laravel with related services: mysql, nginx, php-fpm
version: "3"
services:
db:
image: mysql
environment:
- MYSQL_ROOT_PASSWORD=np2Kmh5g
- MYSQL_DATABASE=lara_play
ports:
- "3311:3306"
volumes: