Skip to content

Instantly share code, notes, and snippets.

View optorun's full-sized avatar
🤔

Pierre TOURON optorun

🤔
View GitHub Profile
#!/bin/bash
set -eo pipefail
action="$1"
## Functions
usage() {
cat <<- EOF
Usage: vpnCtl ACTION
@optorun
optorun / Dockerfile
Created October 8, 2023 12:52
Ansible_CI Dockerfile
# To change the user or uid running the image, pass ANSIBLE_USER / ANSIBLE_USER_UID variables as arg during build (defaults to 'ansible' and '1000') : docker build -f ./Dockerfile_ansible_debian -t ptouron/ansible_ci:trixie-slim --build-arg ANSIBLE_USER=<anotherUser> --build-arg ANSIBLE_USER_UID=<anotherUid> .
FROM debian:trixie-slim
ARG ANSIBLE_USER="ansible"
ARG ANSIBLE_USER_UID="1000"
ENV container=docker
ENV DEBIAN_FRONTEND=noninteractive
ENV LC_ALL=C.UTF-8
# Vars projet
COMPOSE_PROJECT_NAME="K3S_POC"
DEPLOY_TO="bender" # Utilisé pour le déploiement par script
AUTO_REDEPLOY_STACK="yes" # Utilisé pour le déploiement par script
FILES_COPY_MAP="" # Utilisé pour le déploiement par script
# Version des images
K3S_VERSION="v1.26.1-k3s1"
# Subnets
---
# to run define K3S_TOKEN, K3S_VERSION is optional, eg:
# K3S_TOKEN=${RANDOM}${RANDOM}${RANDOM} docker-compose up
version: "3.8"
services:
k3s-server:
image: rancher/k3s:${K3S_VERSION:-latest}
container_name: "${COMPOSE_PROJECT_NAME}_k3s-server"
@optorun
optorun / .env_production (pihole stack)
Created June 19, 2022 09:30
Pihole + dhcp-helper docker stack with traefik on side (http trafic only)
# Vars projet
COMPOSE_PROJECT_NAME="PIHOLE_PRODUCTION"
DEPLOY_TO="t800" # Utilisé pour le déploiement par script
AUTO_REDEPLOY_STACK="yes" # Utilisé pour le déploiement par script
FILES_COPY_MAP="99-edns.conf,pihole_data/dnsmasq.d 98-custom-dhcp.conf,pihole_data/dnsmasq.d 97-blacklist.conf,pihole_data/dnsmasq.d" # Utilisé pour le déploiement par script
# Version des images
PIHOLE_VERSION="2022.05"
DHCPHELPER_VERSION="latest"