Skip to content

Instantly share code, notes, and snippets.

---
apiVersion: v1
kind: Secret
metadata:
name: db1-secrets
type: Opaque
data:
ROOT_PASSWORD: c3VwZXItc2VjcmV0LXBhc3N3b3JkCg==
SITE1_USER_PASSWORD: cGFzc3dvcmQxMjMK
---
FROM wordpress
# Set environment variables used by the Wordpress image
# DB_USER and DB_PASSWORD are included as an example. However,
# these should be removed and set during docker run.
ENV WORDPRESS_DB_HOST=127.0.0.1 \
WORDPRESS_DB_USER=wpuser \
WORDPRESS_DB_PASSWORD=super-secret-password \
WORDPRESS_DB_NAME=wpsite \
WORDPRESS_TABLE_PREFIX=wp_
@serainville
serainville / docker-compose.yml
Created May 11, 2019 11:35
Example Wordpress docker-compose file
version: "3.7"
services:
wordpress:
image: wordpress
ports:
- "80:80"
environment:
- WORDPRESS_DB_HOST=127.0.0.1
- WORDPRESS_DB_USER=wpuser
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: traefik-ingress-controller
namespace: kube-system
---
kind: Deployment
apiVersion: extensions/v1beta1
metadata:
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
name: traefik-ingress-controller
rules:
- apiGroups:
- ""
resources:
- services
@serainville
serainville / init.pp
Created June 13, 2018 18:21
Masterless Puppet Cron Job
class puppet-cron (
String $git_repo = "git@github.com/serainville/example.git"
){
// Let's make sure the Puppet daemon isn't running.
service { "puppet":
ensure => stopped,
enable => false,
} ->
@serainville
serainville / golang-cli.go
Created April 26, 2018 01:57
Golang JSON API CLI
package main
import (
"golang-cli/cmd"
)
func main() {
command.RootCmd.Execute()
}
{
key: "ed7dd2e5a373f90ccfd2ccb08d843a63",
value: [{
username: "user1",
full_name: "John Doe",
user_id: "1234"
}]
}
{
key: "SELECT username,full_name,last_name,userid FROM users WHERE id=1234",
value: [{
username: "user1",
full_name: "John Doe",
user_id: "1234"
}]
}
global
log 127.0.0.1 local0 notice
maxconn 2000
user haproxy
group haproxy
defaults
log global
mode http
option httplog