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 alpine:latest | |
EXPOSE 80 | |
EXPOSE 443 | |
RUN apk add nginx | |
RUN mkdir -p /run/nginx && mkdir -p /var/www | |
COPY nginx.conf /etc/nginx/nginx.conf | |
COPY index.html /var/www | |
CMD ["nginx", "-g", "daemon off; env xxx=1;"] | |
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.4" | |
services: | |
my_app: | |
image: my_app | |
read_only: true | |
restart: always | |
tmpfs: | |
- /run:mode=770,size=1k,uid=200,gid=10000 |
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
- hosts: all | |
become: yes | |
gather_facts: false | |
vars: | |
tasks: | |
- name: Check that the /etc/docker/daemon.json exists | |
stat: | |
path: /etc/docker/daemon.json | |
register: stat_result |
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
{ | |
"sort": ["_doc"], | |
"size": 100, | |
"query": { | |
"bool": { | |
"must": { | |
"match_all": {} | |
}, | |
"filter": { | |
... |
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
# Add this snippet to the top of your playbook. | |
# It will install python2 if missing (but checks first so no expensive repeated apt updates) | |
# [email protected] | |
- hosts: all | |
gather_facts: False | |
tasks: | |
- name: install python 2 | |
raw: test -e /usr/bin/python || (apt -y update && apt install -y python-minimal) |
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/bash | |
help () { | |
HELP=$(cat << EOL0 | |
\n | |
=====================\n | |
gmserver-log-exporter\n | |
=====================\n | |
\n | |
--host - Elastic host IP-address (def: 127.0.0.1)\n |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
goss_version="v0.3.9" | |
vms = { | |
"master" => { :ip => "10.111.111.10", :playbook => "tests/vagrant_master.yml" }, | |
"client" => { :ip => "10.111.111.20", :playbook => "tests/vagrant_client.yml" } | |
} |
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
package main | |
import ( | |
"fmt" | |
"sort" | |
) | |
type User struct { | |
FName string | |
SName string |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure("2") do |config| | |
config.vm.box = "ubuntu/xenial64" | |
#config.vm.box = "geerlingguy/centos7" | |
config.vm.synced_folder "synced/", "/synced" | |
config.vm.provider "virtualbox" do |vb| | |
vb.gui = false | |
vb.memory = 1024 |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure("2") do |config| | |
#config.vm.synced_folder '.', '/vagrant', disabled: true | |
#config.ssh.private_key_path = ["~/.ssh/id_rsa", "~/.vagrant.d/insecure_private_key"] | |
#config.ssh.insert_key = false | |
#config.ssh.forward_agent = true | |
config.vm.box = "ubuntu/bionic64" |