diff --git a/docker-compose/applications/nextcloud-npm.yaml b/docker-compose/applications/nextcloud-npm.yaml new file mode 100644 index 0000000..a33c8b1 --- /dev/null +++ b/docker-compose/applications/nextcloud-npm.yaml @@ -0,0 +1,78 @@ +--- +version: '3' + +volumes: + nextcloud-data: + nextcloud-db: + npm-data: + npm-ssl: + npm-db: + +networks: + frontend: + # add this if the network is already existing! + # external: true + backend: + +services: + + nextcloud-app: + image: nextcloud + restart: always + volumes: + - nextcloud-data:/var/www/html + environment: + - MYSQL_PASSWORD=replace-with-secure-password + - MYSQL_DATABASE=nextcloud + - MYSQL_USER=nextcloud + - MYSQL_HOST=nextcloud-db + networks: + - frontend + - backend + + nextcloud-db: + image: mariadb + restart: always + command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW + volumes: + - nextcloud-db:/var/lib/mysql + environment: + - MYSQL_ROOT_PASSWORD=replace-with-secure-password + - MYSQL_PASSWORD=replace-with-secure-password + - MYSQL_DATABASE=nextcloud + - MYSQL_USER=nextcloud + networks: + - backend + + npm-app: + image: jc21/nginx-proxy-manager:latest + restart: always + ports: + - "80:80" + - "81:81" + - "443:443" + environment: + - DB_MYSQL_HOST=npm-db + - DB_MYSQL_PORT=3306 + - DB_MYSQL_USER=npm + - DB_MYSQL_PASSWORD=replace-with-secure-password + - DB_MYSQL_NAME=npm + volumes: + - npm-data:/data + - npm-ssl:/etc/letsencrypt + networks: + - frontend + - backend + + npm-db: + image: jc21/mariadb-aria:latest + restart: always + environment: + - MYSQL_ROOT_PASSWORD=replace-with-secure-password + - MYSQL_DATABASE=npm + - MYSQL_USER=npm + - MYSQL_PASSWORD=replace-with-secure-password + volumes: + - npm-db:/var/lib/mysql + networks: + - backend \ No newline at end of file diff --git a/docker-compose/applications/nextcloud.yaml b/docker-compose/applications/nextcloud.yaml new file mode 100644 index 0000000..284f9f7 --- /dev/null +++ b/docker-compose/applications/nextcloud.yaml @@ -0,0 +1,42 @@ +--- +version: '3' + +volumes: + nextcloud-data: + nextcloud-db: + +networks: + frontend: + # add this if the network is already existing! + # external: true + backend: + +services: + + nextcloud-app: + image: nextcloud + restart: always + volumes: + - nextcloud-data:/var/www/html + environment: + - MYSQL_PASSWORD=replace-with-secure-password + - MYSQL_DATABASE=nextcloud + - MYSQL_USER=nextcloud + - MYSQL_HOST=nextcloud-db + networks: + - frontend + - backend + + nextcloud-db: + image: mariadb + restart: always + command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW + volumes: + - nextcloud-db:/var/lib/mysql + environment: + - MYSQL_ROOT_PASSWORD=replace-with-secure-password + - MYSQL_PASSWORD=replace-with-secure-password + - MYSQL_DATABASE=nextcloud + - MYSQL_USER=nextcloud + networks: + - backend \ No newline at end of file diff --git a/docker-compose/applications/pihole.yaml b/docker-compose/applications/pihole.yaml new file mode 100644 index 0000000..40f69b4 --- /dev/null +++ b/docker-compose/applications/pihole.yaml @@ -0,0 +1,21 @@ +--- +version: '3' + +services: + + pihole: + container_name: pihole + image: pihole/pihole:latest + ports: + - "53:53/tcp" + - "53:53/udp" + - "67:67/udp" + - "80:80/tcp" + - "443:443/tcp" + environment: + TZ: 'America/Chicago' + WEBPASSWORD: 'testtest' + volumes: + - etcd:/etc/pihole + - dnsmasq:/etc/dnsmasq.d + restart: unless-stopped \ No newline at end of file diff --git a/docker-compose/management/duplicati.yaml b/docker-compose/management/duplicati.yaml new file mode 100644 index 0000000..c040287 --- /dev/null +++ b/docker-compose/management/duplicati.yaml @@ -0,0 +1,19 @@ +--- +version: '2.1' + +services: + + duplicati: + image: ghcr.io/linuxserver/duplicati + container_name: duplicati + environment: + - PUID=1000 + - PGID=1000 + - TZ=Europe/Berlin + volumes: + - /AmberPRO/duplicati/config:/config + - /Backups:/backups + - /:/source + ports: + - 8200:8200 + restart: unless-stopped \ No newline at end of file diff --git a/docker-compose/management/portainer.yaml b/docker-compose/management/portainer.yaml new file mode 100644 index 0000000..9120aed --- /dev/null +++ b/docker-compose/management/portainer.yaml @@ -0,0 +1,12 @@ +--- +version: '3' + +services: + app: + image: 'portainer/portainer-ce:latest' + ports: + - '9000:9000' + - '8000:8000' + volumes: + - /var/run/docker.sock:/var/run/docker.sock + - /AmberPro/portainer/data:/data diff --git a/docker-compose/management/teleport.yaml b/docker-compose/management/teleport.yaml new file mode 100644 index 0000000..2c7a788 --- /dev/null +++ b/docker-compose/management/teleport.yaml @@ -0,0 +1,30 @@ +--- +version: '2' + +services: + + configure: + image: quay.io/gravitational/teleport:4.3 + container_name: teleport-configure + entrypoint: /bin/sh + hostname: dev.the-digital-life.com + command: -c "if [ ! -f /etc/teleport/teleport.yaml ]; then teleport configure > /etc/teleport/teleport.yaml; fi" + volumes: + - ./teleport/config:/etc/teleport + + teleport: + image: quay.io/gravitational/teleport:4.3 + container_name: teleport + entrypoint: /bin/sh + hostname: dev.the-digital-life.com + command: -c "sleep 1 && /bin/dumb-init teleport start -c /etc/teleport/teleport.yaml" + ports: + - "3023:3023" + - "3024:3024" + - "3025:3025" + - "3080:3080" + volumes: + - ./teleport/config:/etc/teleport + - ./teleport/data:/var/lib/teleport + depends_on: + - configure \ No newline at end of file diff --git a/docker-compose/mediaserver/jellyfin.yaml b/docker-compose/mediaserver/jellyfin.yaml new file mode 100644 index 0000000..fd2fe4a --- /dev/null +++ b/docker-compose/mediaserver/jellyfin.yaml @@ -0,0 +1,23 @@ +--- +version: '2.1' + +services: + + jellyfin: + image: ghcr.io/linuxserver/jellyfin + container_name: jellyfin + environment: + - PUID=1000 + - PGID=1000 + - TZ=Europe/Berlin + - JELLYFIN_PublishedServerUrl=192.168.0.32 #optional + volumes: + - /AmberPRO/jellyfin/config:/config + - /AmberPRO/jellyfin/tvshows:/data/tvshows + - /AmberPRO/jellyfin/movies:/data/movies + ports: + - 8096:8096 + - 8920:8920 #optional + - 7359:7359/udp #optional + - 1900:1900/udp #optional + restart: unless-stopped \ No newline at end of file diff --git a/docker-compose/mediaserver/plex.yaml b/docker-compose/mediaserver/plex.yaml new file mode 100644 index 0000000..3cfbbac --- /dev/null +++ b/docker-compose/mediaserver/plex.yaml @@ -0,0 +1,29 @@ +version: '2' + +services: + + linuxserver-plex: + container_name: linuxserver-plex + restart: unless-stopped + image: linuxserver/plex:latest + environment: + - TZ=Europe/Berlin + - PUID=1000 + - PGID=1000 + - VERSION=docker + ports: + - "32400:32400" #(for access to the Plex Media Server) [required] + - "32400:32400/udp" + - "32410:32410/udp" #(for current GDM network discovery) + - "32412:32412/udp" + - "32413:32413/udp" + - "32414:32414/udp" + - "32469:32469" #(for access to the Plex DLNA Server) + - "32469:32469/udp" + - "5353:5353" # (for older Bonjour/Avahi network discovery) + #- "1900:1900/udp" #(for access to the Plex DLNA Server) + + volumes: + - /AmberPRO/plex/config:/config + - /AmberPRO/plex/media1:/data/movies + - /AmberPRO/plex/transcode:/transcode diff --git a/docker-compose/webserver/swag-mysql.yaml b/docker-compose/webserver/swag-mysql.yaml new file mode 100644 index 0000000..ce07649 --- /dev/null +++ b/docker-compose/webserver/swag-mysql.yaml @@ -0,0 +1,40 @@ +--- +version: '2' + +services: + + mariadb: + image: linuxserver/mariadb + container_name: mariadb + environment: + - PUID=1001 + - PGID=1001 + - MYSQL_ROOT_PASSWORD=mariadbpassword + - TZ=Europe/Berlin + - MYSQL_DATABASE=WP_database + - MYSQL_USER=WP_dbuser + - MYSQL_PASSWORD=WP_dbpassword + volumes: + - /opt/webserver_swag/config/mariadb:/config + restart: unless-stopped + + swag: + image: linuxserver/swag + container_name: swag + cap_add: + - NET_ADMIN + environment: + - PUID=1001 + - PGID=1001 + - TZ=Europe/Berlin + - URL=do-test-1.the-digital-life.com + - SUBDOMAINS= + - VALIDATION=http + volumes: + - /opt/webserver_swag/config:/config + ports: + - 443:443 + - 80:80 #optional + depends_on: + - mariadb + restart: unless-stopped \ No newline at end of file diff --git a/docker-compose/webserver/swag.yaml b/docker-compose/webserver/swag.yaml new file mode 100644 index 0000000..50dd5c9 --- /dev/null +++ b/docker-compose/webserver/swag.yaml @@ -0,0 +1,23 @@ +--- +version: '2' + +services: + + swag: + image: linuxserver/swag + container_name: swag + cap_add: + - NET_ADMIN + environment: + - PUID=1001 + - PGID=1001 + - TZ=Europe/Berlin + - URL=do-test-1.the-digital-life.com + - SUBDOMAINS=www + - VALIDATION=http + volumes: + - /opt/webserver_swag/config:/config + ports: + - 443:443 + - 80:80 #optional + restart: unless-stopped \ No newline at end of file diff --git a/vagrant/hyperv/ubuntu/docker/Vagrantfile b/vagrant/hyperv/ubuntu/docker/Vagrantfile new file mode 100755 index 0000000..276b0ee --- /dev/null +++ b/vagrant/hyperv/ubuntu/docker/Vagrantfile @@ -0,0 +1,20 @@ +# -*- mode: ruby -*- +# vi: set ft=ruby : + +Vagrant.configure("2") do |config| + config.vm.box = "generic/ubuntu2004" + config.vm.network "public_network" + config.vm.synced_folder ".", "/vagrant_data", disabled: true + config.vm.provider "hyperv" + config.vm.provider "hyperv" do |h| + h.enable_virtualization_extensions = false + h.linked_clone = true + h.memory = 2048 + h.vmname = "ubuntu_docker_1" + end + + config.vm.provision "ansible" do |a| + a.verbose = "v" + a.playbook = "playbook.yaml" + end +end diff --git a/vagrant/hyperv/ubuntu/docker/playbook.yaml b/vagrant/hyperv/ubuntu/docker/playbook.yaml new file mode 100644 index 0000000..f2f1566 --- /dev/null +++ b/vagrant/hyperv/ubuntu/docker/playbook.yaml @@ -0,0 +1,29 @@ +--- +- hosts: all + become: yes + tasks: + - name: install prerequisites + apt: + name: + - apt-transport-https + - ca-certificates + - curl + - gnupg-agent + - software-properties-common + update_cache: yes + - name: add apt-key + apt_key: + url: https://download.docker.com/linux/ubuntu/gpg + - name: add docker repo + apt_repository: + repo: deb https://download.docker.com/linux/ubuntu focal stable + - name: install docker + apt: + name: + - docker-ce + - docker-ce-cli + - containerd.io + - docker-compose + update_cache: yes + - name: add userpermissions + shell: "usermod -aG docker vagrant" diff --git a/vagrant/hyperv/ubuntu/microk8s-installed/Vagrantfile b/vagrant/hyperv/ubuntu/microk8s-installed/Vagrantfile new file mode 100755 index 0000000..166cabb --- /dev/null +++ b/vagrant/hyperv/ubuntu/microk8s-installed/Vagrantfile @@ -0,0 +1,20 @@ +# -*- mode: ruby -*- +# vi: set ft=ruby : + +Vagrant.configure("2") do |config| + config.vm.box = "generic/ubuntu2004" + config.vm.network "public_network" + config.vm.synced_folder ".", "/vagrant_data", disabled: true + config.vm.provider "hyperv" + config.vm.provider "hyperv" do |h| + h.enable_virtualization_extensions = false + h.linked_clone = true + h.memory = 2048 + h.vmname = "ubuntu_plain_1" + end + + config.vm.provision "ansible" do |a| + a.verbose = "v" + a.playbook = "playbook.yaml" + end +end diff --git a/vagrant/hyperv/ubuntu/microk8s-installed/playbook.yaml b/vagrant/hyperv/ubuntu/microk8s-installed/playbook.yaml new file mode 100644 index 0000000..8412079 --- /dev/null +++ b/vagrant/hyperv/ubuntu/microk8s-installed/playbook.yaml @@ -0,0 +1,11 @@ +--- +- hosts: all + become: yes + tasks: + - name: install microk8s + snap: + classic: yes + name: microk8s + - name: add userpermissions + shell: "usermod -aG microk8s vagrant" + diff --git a/vagrant/hyperv/ubuntu/plain-with-cockpit/Vagrantfile b/vagrant/hyperv/ubuntu/plain-with-cockpit/Vagrantfile new file mode 100755 index 0000000..9a3e191 --- /dev/null +++ b/vagrant/hyperv/ubuntu/plain-with-cockpit/Vagrantfile @@ -0,0 +1,22 @@ +# -*- mode: ruby -*- +# vi: set ft=ruby : + +Vagrant.configure("2") do |config| + config.vm.box = "generic/ubuntu2004" + config.vm.network "public_network", bridge: "BRIDGE" + config.vm.synced_folder ".", "/vagrant_data", disabled: true + config.vm.provider "hyperv" + config.vm.hostname = "ubuntu_plan-with-cockpit-1" + + config.vm.provider "hyperv" do |h| + h.enable_virtualization_extensions = false + h.linked_clone = true + h.memory = 2048 + h.vmname = "ubuntu_plan-with-cockpit-1" + end + + config.vm.provision "ansible" do |a| + a.verbose = "v" + a.playbook = "playbook.yaml" + end +end diff --git a/vagrant/hyperv/ubuntu/plain-with-cockpit/playbook.yaml b/vagrant/hyperv/ubuntu/plain-with-cockpit/playbook.yaml new file mode 100755 index 0000000..fad86e6 --- /dev/null +++ b/vagrant/hyperv/ubuntu/plain-with-cockpit/playbook.yaml @@ -0,0 +1,8 @@ +--- +- hosts: all + become: yes + tasks: + - name: install cockpit + apt: + name: cockpit + update_cache: yes diff --git a/vagrant/hyperv/ubuntu/plain/Vagrantfile b/vagrant/hyperv/ubuntu/plain/Vagrantfile new file mode 100755 index 0000000..c1c5863 --- /dev/null +++ b/vagrant/hyperv/ubuntu/plain/Vagrantfile @@ -0,0 +1,15 @@ +# -*- mode: ruby -*- +# vi: set ft=ruby : + +Vagrant.configure("2") do |config| + config.vm.box = "generic/ubuntu2004" + config.vm.network "public_network" + config.vm.synced_folder ".", "/vagrant_data", disabled: true + config.vm.provider "hyperv" + config.vm.provider "hyperv" do |h| + h.enable_virtualization_extensions = false + h.linked_clone = true + h.memory = 2048 + h.vmname = "ubuntu_plain_1" + end +end diff --git a/vagrant/hyperv/ubuntu/ubuntu-cluster-plain/Vagrantfile b/vagrant/hyperv/ubuntu/ubuntu-cluster-plain/Vagrantfile new file mode 100644 index 0000000..a10956d --- /dev/null +++ b/vagrant/hyperv/ubuntu/ubuntu-cluster-plain/Vagrantfile @@ -0,0 +1,38 @@ +# -*- mode: ruby -*- +# vi: set ft=ruby : + +Vagrant.configure("2") do |config| + + config.vm.define "node1", primary: true do |node1| + + node1.vm.box = "generic/ubuntu2004" + node1.vm.network "public_network", bridge: "BRIDGE" + node1.vm.synced_folder ".", "/vagrant_data", disabled: true + node1.vm.provider "hyperv" + node1.vm.hostname = "node1" + + node1.vm.provider "hyperv" do |h| + h.enable_virtualization_extensions = false + h.linked_clone = true + h.memory = 2048 + h.vmname = "node1" + end + end + + config.vm.define "node2" do |node2| + + node2.vm.box = "generic/ubuntu2004" + node2.vm.network "public_network", bridge: "BRIDGE" + node2.vm.synced_folder ".", "/vagrant_data", disabled: true + node2.vm.provider "hyperv" + node2.vm.hostname = "node2" + + node2.vm.provider "hyperv" do |h| + h.enable_virtualization_extensions = false + h.linked_clone = true + h.memory = 2048 + h.vmname = "node2" + end + end + +end \ No newline at end of file diff --git a/vagrant/kvm/ubuntu/Vagrantfile b/vagrant/kvm/ubuntu/Vagrantfile new file mode 100644 index 0000000..148e2a3 --- /dev/null +++ b/vagrant/kvm/ubuntu/Vagrantfile @@ -0,0 +1,16 @@ +# -*- mode: ruby -*- +# vi: set ft=ruby : + +Vagrant.configure("2") do |config| + config.vm.box = "generic/ubuntu2004" + config.vm.network :public_network, + :dev => "virbr0", + :mode => "bridge", + :type => "bridge" + config.vm.synced_folder ".", "/vagrant_data", disabled: true + config.vm.provider :libvirt do |libvirt| + libvirt.cpus = 2 + libvirt.memory = 4096 + libvirt.nested = true + end +end