This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.7' | |
# starts 4 docker containers running minio server instances. Each | |
# minio server's web interface will be accessible on the host at port | |
# 9001 through 9004. | |
services: | |
minio1: | |
image: minio/minio:RELEASE.2020-08-18T19-41-00Z | |
volumes: | |
- data1-1:/data1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# MrChoke | |
# Ref: https://docs.docker.com/engine/reference/commandline/history/ | |
# Ref: https://stackoverflow.com/questions/19104847/how-to-generate-a-dockerfile-from-an-image | |
if [ $# -eq 0 ]; then | |
echo "No docker image provided." | |
echo -e "Example:\n" | |
echo -e "$0 nginx:latest\n" | |
exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Configuration file for runtime kernel parameters. | |
# See sysctl.conf(5) for more information. | |
# See also http://www.nateware.com/linux-network-tuning-for-2013.html for | |
# an explanation about some of these parameters, and instructions for | |
# a few other tweaks outside this file. | |
# | |
# See also: https://gist.github.com/kgriffs/4027835 | |
# | |
# Assumes a beefy machine with lots of network bandwidth |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Kernel sysctl configuration file for Linux | |
# https://www.kernel.org/doc/Documentation/sysctl/ | |
# | |
# Original by Michiel Klaver <https://klaver.it/linux/sysctl.conf> | |
# Modify by Kawin Viriyaprasopsook <kawin.vir@zercle.tech> | |
# | |
# The following is suitable for dedicated web server, mail, file server, KVM server etc. | |
# place file in /etc/sysctl.d/60-sysctl.conf | |
# and run `sysctl --system` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.ssh_deploy_template: &ssh_deploy_template | |
# TEMPLATE - see https://docs.gitlab.com/ee/ci/yaml/README.html#anchors | |
# ... | |
# Here's the magic to get the code from the GitLab variable into a bash variable and then even executed on an SSH session | |
script: | |
# Put gitlab variable into shell variable to improve quote handling | |
- CMD=$SCRIPT_CMD | |
# Print for debugging | |
- echo -e "Executing:\n$CMD" |
sysctl -w fs.file-max=12000500
sysctl -w fs.nr_open=20000500
# Set the maximum number of open file descriptors
ulimit -n 20000000
# Set the memory size for TCP with minimum, default and maximum thresholds
sysctl -w net.ipv4.tcp_mem='10000000 10000000 10000000'
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [event][module] == "apache" { | |
if [fileset][name] == "access" { | |
grok { | |
match => { "message" => [ | |
"%{IPORHOST:[source][address]} - %{DATA:[user][name]} \[%{HTTPDATE:[apache][access][time]}\] \"(?:%{WORD:[http][request][method]} %{DATA:[url][original]} HTTP/%{NUMBER:[http][version]:float}|-)?\" %{NUMBER:[http][response][status_code]:int} (?:%{NUMBER:[http][response][body][bytes]:int}|-)( \"%{DATA:[http][request][referrer]}\")?( \"%{DATA:[user_agent][original]}\")?", | |
"%{IPORHOST:[source][address]} - %{DATA:[user][name]} \[%{HTTPDATE:[apache][access][time]}\] \"-\" %{NUMBER:[http][response][status_code]:int} -", | |
"\[%{HTTPDATE:[apache][access][time]}\] %{IPORHOST:[source][address]} %{DATA:[apache][access][ssl][protocol]} %{DATA:[apache][access][ssl][cipher]} \"%{WORD:[http][request][method]} %{DATA:[url][original]} HTTP/%{NUMBER:[http][version]:float}\" %{NUMBER:[http][response][body][bytes]:int}"] | |
} | |
remove_field => [ "message" ] | |
add_field => { "[event][created]" => "%{@timestamp}" } |
127.0.0.1 - - [26/Mar/2016:19:09:19 -0400] "GET / HTTP/1.1" 401 194 "" "Mozilla/5.0 Gecko" "-"
%{IPORHOST:clientip} (?:-|(%{WORD}.%{WORD})) %{USER:ident} \[%{HTTPDATE:timestamp}\] "(?:%{WORD:verb} %{NOTSPACE:request}(?: HTTP/%{NUMBER:httpversion})?|%{DATA:rawrequest})" %{NUMBER:response} (?:%{NUMBER:bytes}|-) %{QS:referrer} %{QS:agent} %{QS:forwarder}