Skip to content

Instantly share code, notes, and snippets.

stage('Stage Name') {
steps {
build(job: 'pipeline.name', parameters: [string(name: 'DEPLOY_TO', value: "test")])
}
}
@tung1404
tung1404 / docker-compose.yml
Created September 18, 2021 07:12 — forked from MKagesawa/docker-compose.yml
Docker-compose MySQL Image create multiple databases
# The official MySQL (https://hub.docker.com/_/mysql/) supports only one MYSQL_DATABASE environment variable.
# By modifying the entrypoint and passing shell script, you can create multiple dbs without having to make a mysql image just for this purpose.
version: '3'
services:
# Some other service connecting to mysql
db:
image: mysql:5.6
@tung1404
tung1404 / docker-compose.yml
Created October 20, 2021 15:58 — forked from undernewmanagement/docker-compose.yml
Pristine config for Traefik 2.0, Docker, and LetsEncrypt with sample container. Includes a HTTP to HTTPS redirect
version: '3'
services:
traefik:
container_name: traefik
image: traefik:v2.0
command:
- "--api.insecure=true"
- "--providers.docker=true"
@tung1404
tung1404 / docker-compose.yaml
Created October 21, 2021 03:14 — forked from coltenkrauter/docker-compose.yaml
Traefik V2 Docker Compose file with LetsEncrypt and HTTPS redirect - Traefik dashboard and simple whoami service
# Tutorial: https://blog.creekorful.com/2020/01/how-to-expose-traefik-2-dashboard-securely-docker-swarm/
version: '3'
services:
reverse-proxy:
image: traefik:2.3
command:
# - '--log.level=DEBUG'
- '--api=true'
- '--api.dashboard=true'
@tung1404
tung1404 / Vagrantfile
Created January 25, 2022 07:40 — forked from olberger/Vagrantfile
"Rapidly spinning up a VM with Ubuntu, Docker and Minikube (using the –vm-driver=none option) on my Windows laptop using Vagrant and Oracle VirtualBox" by Marc Lameriks - Source: https://technology.amis.nl/2019/02/12/rapidly-spinning-up-a-vm-with-ubuntu-docker-and-minikube-using-the-vm-drivernone-option-on-my-windows-laptop-using-vagrant-and-ora…
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/xenial64"
config.vm.define "ubuntu_minikube" do |ubuntu_minikube|
config.vm.network "forwarded_port",
guest: 8001,
host: 8001,
auto_correct: true
@tung1404
tung1404 / jenkins.yml
Created February 15, 2022 08:18 — forked from santosh/jenkins.yml
Playbook for installation of Jenkins server on RHEL derived distros.
---
- name: install and start jenkins
hosts: web
become: yes
tasks:
- name: add redhat-stable jenkins repo
ansible.builtin.get_url:
url: https://pkg.jenkins.io/redhat-stable/jenkins.repo
dest: /etc/yum.repos.d/jenkins.repo
@tung1404
tung1404 / application.properties
Created February 18, 2022 09:37 — forked from seycileli/application.properties
Spring Boot – DataSource Configuration / application.properties example
<!-- MAKE SURE TO ADD DATABASE DEPENDENCY IN POM.XML -->
# H2
spring.datasource.url=jdbc:h2:file:C:/temp/test
spring.datasource.username=sa
spring.datasource.password=
spring.datasource.driverClassName=org.h2.Driver
spring.jpa.database-platform=org.hibernate.dialect.H2Dialect
# MySQL
@tung1404
tung1404 / docker-mod.yml
Created March 5, 2022 03:19 — forked from fl64/docker-mod.yml
Ansible playbook for modifying /etc/docker/daemon.json config (based on https://stackoverflow.com/questions/50796341/add-a-new-key-value-to-a-json-file-using-ansible)
- 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
@tung1404
tung1404 / Vagrantfile
Created March 20, 2022 16:42 — forked from akaron/Vagrantfile
use vagrant and k3s to deploy a kubernetes cluster in local VM
# run a kubernetes cluster in local VM using vagrant + k3s
# require: Virtualbox, vagrant
# steps:
# * in the folder contain this `Vagrantfile`, run `vagrant up` and wait a bit for provisioning.
# Once done, `vagrant ssh master` into the node and start using the k8s cluster,
# such as `kubectl get nodes`, `kubectl get pods -A`, `kubectl get componentstatus`,
# or `kubectl run busybox --image=busybox:1.28 --rm --restart=Never -it -- nslookup kubernetes`
# * To clean up, logout these nodes, then run `vagrant destroy` to destroy the VMs.
# - next time run `vagrant up` again to provision again
# - or run `vagrant halt` to halt these VMs, and bring them back to the same state
@tung1404
tung1404 / docker-compose.yml
Created April 2, 2022 09:20 — forked from nelsondev19/docker-compose.yml
How to monitor PostgreSQL with Prometheus and Grafana | Docker
version: "3.9"
services:
grafana:
image: grafana/grafana
ports:
- 3000:3000
prometheus:
image: prom/prometheus
ports: