Skip to content

Instantly share code, notes, and snippets.

@plunix
plunix / a_Docker setup.md
Created November 13, 2024 06:34 — forked from Oluwatobilobaoke/a_Docker setup.md
Installing SonarQube on Docker and SonarScanner using Homebrew on macOS

Windows Containers Logging

With Windows Containers, as with any application, you will need to consider your logging strategy. In the containers world it is generally accepted to log to STDOUT/STDERR (standard out and standard error). As you scale up your services you will need to aggregate and store these logs for analysis and debugging later on. There exist many back end systems to aggregate logs and help with analysis, in Azure you have Log Analytics and Application Insights.

There are two general strategies for configuring your containers to send logs to a backend logging system containers:

  • In container logging - Your application is responsible for sending the logs directly to the backend system. This can also be [configured via sidecar].
  • Host level logging - You application is configured for sending logs to a log collection agent on the system. The logging agent will
@plunix
plunix / province.geojson
Created January 24, 2020 10:08 — forked from davidejmancino/province.geojson
Confini amministrativi delle province italiane
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
We can't make this file beautiful and searchable because it's too large.
ID,Comune,Classe di priorità,Fonte,Area di riferimento
1,Acciano,Alto,"Ministero dell'Ambiente, mappatura amianto 2013",Abruzzo
2,Acciano,Basso,"Ministero dell'Ambiente, mappatura amianto 2013",Abruzzo
3,Aielli,Alto,"Ministero dell'Ambiente, mappatura amianto 2013",Abruzzo
4,Aielli,Alto,"Ministero dell'Ambiente, mappatura amianto 2013",Abruzzo
5,Aielli,Alto,"Ministero dell'Ambiente, mappatura amianto 2013",Abruzzo
6,Aielli,Alto,"Ministero dell'Ambiente, mappatura amianto 2013",Abruzzo
7,Alfedena,Alto,"Ministero dell'Ambiente, mappatura amianto 2013",Abruzzo
8,Anversa Degli Abruzzi,Alto,"Ministero dell'Ambiente, mappatura amianto 2013",Abruzzo
@plunix
plunix / world-10m.geojson
Created January 24, 2020 10:07 — forked from davidejmancino/world-10m.geojson
Confini delle nazioni a livello globale. I nomi di alcuni paesi sono stati tradotti in Italiano
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@plunix
plunix / docker.sh
Created January 2, 2020 20:34 — forked from crosbymichael/docker.sh
Docker v2 PoC Run
> docker run --rm -t -i --logger d2-syslog --profile privileged --net d2 --net b2 alpine ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
3: eth0@if28: <BROADCAST,MULTICAST,UP,LOWER_UP,M-DOWN> mtu 1500 qdisc noqueue state UP
link/ether b2:da:6d:61:18:56 brd ff:ff:ff:ff:ff:ff
inet 10.10.0.52/24 brd 10.10.0.255 scope global eth0
@plunix
plunix / dump-restore
Created December 30, 2019 11:41 — forked from ricjcosme/dump-restore
DUMP / RESTORE PostgreSQL Kubernetes
DUMP
// pod-name name of the postgres pod
// postgres-user database user that is able to access the database
// database-name name of the database
kubectl exec [pod-name] -- bash -c "pg_dump -U [postgres-user] [database-name]" > database.sql
RESTORE
// pod-name name of the postgres pod
// postgres-user database user that is able to access the database
// database-name name of the database
@plunix
plunix / mysql-docker.sh
Created December 17, 2019 09:49 — forked from spalladino/mysql-docker.sh
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
@plunix
plunix / nginx_deployment.yaml
Created December 13, 2019 17:07 — forked from petitviolet/nginx_deployment.yaml
sample Nginx configuration on Kubernetes using ConfigMap to configure nginx.
apiVersion: v1
kind: ConfigMap
metadata:
name: nginx-conf
data:
nginx.conf: |
user nginx;
worker_processes 3;
error_log /var/log/nginx/error.log;
events {
# Cluster management tools.
# See https://github.com/grampelberg/k8s-clusters for updates and documentation.
export CLUSTER_NAME ?= $(shell cat tmp/current 2>/dev/null || echo $$(whoami)-dev)
export MACHINE_TYPE ?= n1-standard-2
export DISK_SIZE ?= 100
export MAX_NODES ?= 10
export NETWORK ?= dev
export PROJECT ?= foobar
export VERSION ?= latest