This file contains hidden or 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
# limit the number of connections to 1 per second and allow to burst to 10 | |
limit_req_zone $http_x_forwarded_for zone=application:10m rate=1r/s; # For Load Balanced environments | |
#limit_req_zone $remote_addr zone=application:10m rate=1r/s; # For Single Instance environments | |
limit_req zone=application burst=10 nodelay; | |
limit_req_status 429; | |
limit_conn_status 429; | |
# pass real IP from client to NGINX | |
real_ip_header X-Forwarded-For; | |
set_real_ip_from 0.0.0.0/0; |
This file contains hidden or 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
[defaults] | |
stdout_callback=debug | |
stderr_callback=debug |
This file contains hidden or 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
FROM lsiobase/alpine.python:3.8 | |
# set version label | |
ARG BUILD_DATE | |
ARG VERSION | |
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" | |
LABEL maintainer="sparklyballs" | |
# set python to use utf-8 rather than ascii | |
ENV PYTHONIOENCODING="UTF-8" |
This file contains hidden or 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
vars: | |
es_nodes: | |
elastic1: | |
es_port: 9200 | |
elastic2: | |
es_port: 9201 | |
elastic3: | |
es_port: 9202 | |
elastic4: | |
es_port: 9203 |
This file contains hidden or 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
FROM fluent/fluentd | |
RUN apk add --update --virtual .build-deps \ | |
sudo build-base ruby-dev \ | |
&& sudo gem install \ | |
fluent-plugin-elasticsearch \ | |
&& sudo gem sources --clear-all \ | |
&& apk del .build-deps \ | |
&& rm -rf /var/cache/apk/* \ | |
/home/fluent/.gem/ruby/2.4.0/cache/*.gem |
This file contains hidden or 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
# resize /var/www/server.name/pics/image.jpg?h=100&w=100 to /var/www/server.name/pics/100x100/image.jpg | |
server { | |
listen 80; | |
server_name server.name; | |
root /var/www/server.name; | |
location /media/ { | |
alias /var/www/server.name/pics/; |
This file contains hidden or 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
[root@lemon bonnie]# mkdir /root/bonnie && cd /root/bonnie | |
[root@lemon bonnie]# bonnie++ -c 16 -s 16384 -d . -u 0:0 | |
Using uid:0, gid:0. | |
Writing a byte at a time...done | |
Writing intelligently...done | |
Rewriting...done | |
Reading a byte at a time...done | |
Reading intelligently...done | |
start 'em...done...done...done...done...done... | |
Create files in sequential order...done. |
This file contains hidden or 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: '2' | |
services: | |
helloworld: | |
image: muresan/node-helloworld:1.2 | |
labels: | |
traefik.frontend.rule: Host:www.helloworld.com,helloworld.com | |
traefik.port: '3000' | |
traefik.enable: 'true' | |
traefik.protocol: 'http' | |
traefik.frontend.entryPoints: 'http' |
This file contains hidden or 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
# System default settings live in /usr/lib/sysctl.d/00-system.conf. | |
# To override those settings, enter new settings here, or in an /etc/sysctl.d/<name>.conf file | |
# | |
# For more information, see sysctl.conf(5) and sysctl.d(5). | |
# Increase size of file handles and inode cache | |
fs.file-max = 2097152 | |
# Do less swapping | |
vm.swappiness = 10 |
This file contains hidden or 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
# format table | |
$ docker ps -a --format 'table {{.ID}}\t{{.Image}}\t{{.Command}}\t{{.CreatedAt}}\t{{.Status}}' | |
# filter | |
# until (<timestamp>) - only remove containers created before given timestamp | |
# label (label=<key>, label=<key>=<value>, label!=<key>, or label!=<key>=<value>) | |
# - only remove containers with (or without, in case label!=... is used) the specified labels. | |
$ docker run -ti -l keep=yes -d alpine sleep 1h | |
$ docker container prune --filter='label!=keep=yes' |