Skip to content

Instantly share code, notes, and snippets.

View abnerrizzi's full-sized avatar
🛸
Working from home

Abner Rizzi abnerrizzi

🛸
Working from home
View GitHub Profile
@abnerrizzi
abnerrizzi / Experimental Docker structure.md
Created August 23, 2023 22:41 — forked from shinsenter/Experimental Docker structure.md
Docker structure for deploying to multiple environments

Beginning

There are many approaches to implementing a reuse of a common preset for Docker services for multiple environments, such as production and local environments.

This makes it possible to ensure the highest consistency for different environments with the same code-base. Implementing reuse of docker compose options also makes it easier to manage them.

I found on github a project called serversideup/spin. They took an approach using a feature called Docker overrides, to change some properties of common services for different environments.

After reading through their documentation, I realized that there are a few real-life cases where this project can not implement (or is difficult to archive).

@abnerrizzi
abnerrizzi / ubuntu18-joinad.sh
Created December 26, 2024 19:57
Ubuntu bash script to join PC to Domain and add a given group to do sudo without password
#!/bin/bash
# Simplest script to join ubuntu 18 to AD
declare user=user
declare group=ADGroup
declare sudo_group=${group}
declare domain=domain.com
declare dns_servers="1.1.1.1, 4.4.4.4"
declare dns_search="domain.lan, domain.local"