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' |
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
| resource "aws_iam_policy" "iam-getrole" { | |
| name = "iam-getrole" | |
| policy = <<EOF | |
| { | |
| "Version": "2012-10-17", | |
| "Statement": [ | |
| { | |
| "Effect": "Allow", | |
| "Action": "iam:GetRole", | |
| "Resource": "*" |
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
| # ENSURE: | |
| # - 2x EFS are created, one regular one maxio (maximum flexibility) | |
| # - Ensure the security groups attached to the EFSs are allowing NFS access | |
| # - Ensure that nfs-utils / nfs-common is installed on the machines | |
| # - Test prior that you can mount the filesystems using the commands from the EFS UI | |
| # grab docker version for plugin install reasons | |
| DOCKER_VERSION=`docker version -f "{{ .Server.Version }}"` | |
| # create an EFS General Purpose | |
| EFS_ID_REGULAR=fs-00000001 |
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.3' | |
| services: | |
| kafka1: | |
| image: confluentinc/cp-kafka | |
| environment: | |
| - KAFKA_BROKER_ID=1 | |
| - KAFKA_ZOOKEEPER_CONNECT=zookeeper1:2181 | |
| - KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://localhost:9092 | |
| deploy: |
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
| rancher: | |
| services_include: | |
| ubuntu-console: true | |
| services: | |
| iptables: | |
| image: busybox | |
| net: host | |
| uts: host | |
| pid: host | |
| ipc: host |
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.1' | |
| services: | |
| helloworld: | |
| image: muresan/node-helloworld:${TAG:-1.0} | |
| deploy: | |
| labels: | |
| traefik.port: "3000" | |
| traefik.protocol: "http" | |
| traefik.backend.loadbalancer.sticky: "true" |
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
| SYSLOG_TAG: '{{ `{{ index .Container.Config.Labels "com.docker.swarm.service.name" }}` }}' | |
| shell: docker node ls --format {% raw %} '{{.ID}} {{.Status}}' {% endraw %} | grep Down | sed 's/.Down$//' | xargs --no-run-if-empty docker node rm |
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 | |
| jq -R -s '{"value":.}' |
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.2' | |
| services: | |
| elasticsearch1: &elasticsearch | |
| image: cbb/elasticsearch:5.5.0 | |
| environment: &environment | |
| ES_JAVA_OPTS: '-Xms256m -Xmx256m' | |
| cluster.name: es-cluster | |
| node.name: es1 | |
| network.bind_host: 0.0.0.0 | |
| discovery.zen.minimum_master_nodes: 2 |
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 |