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: '3.7' | |
services: | |
ldap_server: | |
image: wshihadeh/openldap:withdata | |
environment: | |
LDAP_ADMIN_PASSWORD: test1234 | |
LDAP_BASE_DN: dc=shihadeh,dc=intern | |
ports: | |
- 389:389 | |
volumes: |
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
2020-01-19 16:12:33.UTC b072799d-3f09-5f2d-ad6f-95778dddc696 OS=Linux AR=_x86_64_ CPU=(4) USR=4.65 NICE=0.00 SYS=3.58 IOWAIT=0.21 IRQ=0.00 SOFT=0.20 STEAL=0.00 GUEST=0.00 IDLE=91.36 | |
2020-01-19 16:12:34.UTC 41f42f48-518b-a636-b649-e7eb8bc6ae59 OS=Linux AR=_x86_64_ CPU=(4) USR=4.65 NICE=0.00 SYS=3.58 IOWAIT=0.21 IRQ=0.00 SOFT=0.20 STEAL=0.00 GUEST=0.00 IDLE=91.36 | |
2020-01-19 16:12:35.UTC 2f34e698-ce7e-92e6-b4bd-8b57de38a44a OS=Linux AR=_x86_64_ CPU=(4) USR=4.65 NICE=0.00 SYS=3.58 IOWAIT=0.21 IRQ=0.00 SOFT=0.20 STEAL=0.00 GUEST=0.00 IDLE=91.36 | |
2020-01-19 16:12:35.UTC 4c827890-b0c4-9c59-4c04-2a55b55ba0c1 OS=Linux AR=_x86_64_ CPU=(4) USR=4.65 NICE=0.00 SYS=3.58 IOWAIT=0.21 IRQ=0.00 SOFT=0.20 STEAL=0.00 GUEST=0.00 IDLE=91.36 |
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
#!/bin/sh -e | |
while true | |
do | |
DATE=$(echo `date +%Y-%m-%d\ %T.%Z`) | |
ID=$(od -x /dev/urandom | head -1 | awk '{OFS="-"; print $2$3,$4,$5,$6,$7$8$9}') | |
SYSTEM_DATA=$(mpstat) | |
SYSTEM_INFO=$(echo $SYSTEM_DATA | awk '{OFS=" "; print "OS="$1" AR="$5" CPU="$6") USR="$21" NICE="$22" SYS="$23\ | |
" IOWAIT="$24" IRQ="$25" SOFT="$26" STEAL="$27" GUEST="$28" IDLE="$29}') |
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
<match row.busylogbox.**> | |
@type record_reformer | |
tag busylogbox.${tag_suffix[2]} | |
renew_record false | |
enable_ruby true | |
<record> | |
request_time ${record['log'].scan(/(?<param>^[^ ]+ [^ ]+)/).flatten.compact[0]} | |
request_id ${record['log'].scan(/(?<param>[^ ]+) OS/).flatten.compact[0]} | |
os ${record['log'].scan(/OS=(?<param>[^ ]+)/).flatten.compact[0]} | |
architecture ${record['log'].scan(/AR=(?<param>[^ ]+)/).flatten.compact[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
version: '3.7' | |
networks: | |
logging: | |
name: logging | |
driver: overlay | |
attachable: true | |
services: |
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
<match multiline.**> | |
@type record_reformer | |
tag parsed.${tag_suffix[2]} | |
renew_record false | |
enable_ruby true | |
<record> | |
request_start_time ${record['message'].scan(/\[(?<param>[^ ]+) \#\d+\] [^ ]+ -- : (\[[^ ]+\] )+Started/).flatten.compact[0]} | |
log_level ${record['message'].scan(/^(I|F|D|W|E), \[[^ ]+ \#\d+\]( )+(?<param>[^ ]+) -- :/).flatten.compact.sort.first} | |
request_id ${record['message'].scan(/\[[^ ]+ \#\d+\] [^ ]+ -- : \[(?<param>[^ ]+)\] (\[[^ ]+\] )*Started/).flatten.compact[0]} | |
request_method ${record['message'].scan(/\[[^ ]+ \#\d+\] [^ ]+ -- : (\[[^ ]+\] )+Started (?<param>[^ ]+) [^ ]+ for/).flatten.compact[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
version: '3.7' | |
services: | |
rubygems: | |
container_name: "ruby-gems" | |
image: wshihadeh/rubygems:latest | |
volumes: | |
- gem_data:/application/data | |
ports: |
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
Rails.application.configure do | |
config.lograge.enabled = Rails.configuration.x.feature.lograge | |
#config.lograge.formatter = Lograge::Formatters::Json.new | |
config.lograge.base_controller_class = ['ActionController::API', 'ActionController::Base'] | |
config.lograge.custom_options = lambda do |event| | |
exceptions = %w[controller action format id] | |
{ | |
request_time: Time.now, | |
application: Rails.application.class.parent_name, |
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 wshihadeh/rails-base-image-ruby:2.6.5-mysql | |
LABEL maintainer="Al-waleed Shihadeh <[email protected]>" | |
COPY ./docker-entrypoint.sh / | |
ENTRYPOINT ["/docker-entrypoint.sh"] | |
USER rails | |
WORKDIR /application |
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: '3.7' | |
services: | |
mysql: | |
image: mysql:5.7 | |
command: mysqld --general-log=1 --general-log-file=/var/log/mysql/general-log.log | |
volumes: | |
- db_data:/var/lib/mysql | |
restart: always |