pull everything up one directory out of ansible
parent
f11141dc35
commit
804091dff2
@ -1,45 +0,0 @@
|
|||||||
name: Build and Push Images
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- "*"
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
|
|
||||||
env:
|
|
||||||
REGISTRY: ghcr.io
|
|
||||||
IMAGE_NAME: start-portainer-stack
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-and-push-image:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Log in to the Container registry
|
|
||||||
uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b
|
|
||||||
with:
|
|
||||||
registry: ${{ env.REGISTRY }}
|
|
||||||
username: ${{ github.actor }}
|
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Extract metadata (tags, labels) for Docker
|
|
||||||
id: meta
|
|
||||||
uses: docker/metadata-action@69f6fc9d46f2f8bf0d5491e4aabe0bb8c6a4678a
|
|
||||||
with:
|
|
||||||
images: ${{ env.REGISTRY }}/chatton/${{ env.IMAGE_NAME }}
|
|
||||||
|
|
||||||
- name: Build and push Docker image
|
|
||||||
uses: docker/build-push-action@e551b19e49efd4e98792db7592c17c09b89db8d8
|
|
||||||
with:
|
|
||||||
context: scripts/portainer
|
|
||||||
push: true
|
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
|
||||||
@ -1,23 +0,0 @@
|
|||||||
---
|
|
||||||
name: Test Playbook
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- "master"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
homelab-test:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
# - name: "pull image"
|
|
||||||
# run: docker pull geerlingguy/docker-debian10-ansible:latest
|
|
||||||
# - name: Molecule
|
|
||||||
# uses: gofrolist/molecule-action@v2
|
|
||||||
# with:
|
|
||||||
# molecule_command: test
|
|
||||||
# molecule_working_dir: ansible/roles/setup_docker
|
|
||||||
# env:
|
|
||||||
# ANSIBLE_FORCE_COLOR: '1'
|
|
||||||
# PY_COLORS: "1"
|
|
||||||
@ -1,14 +0,0 @@
|
|||||||
FROM debian
|
|
||||||
|
|
||||||
# Install prerequisities for Ansible
|
|
||||||
RUN apt-get update
|
|
||||||
RUN apt-get -y install python3 python3-nacl python3-pip libffi-dev
|
|
||||||
|
|
||||||
# Install ansible
|
|
||||||
RUN pip3 install ansible
|
|
||||||
|
|
||||||
# Copy your ansible configuration into the image
|
|
||||||
ADD ansible /ansible
|
|
||||||
COPY ansible/homelab/hosts /etc/ansible/hosts
|
|
||||||
|
|
||||||
CMD [ "ansible-playbook", "/ansible/homelab/playbooks/setup-home-lab.yml", "-v","--connection", "local", "--skip-tags", "skip-e2e"]
|
|
||||||
@ -0,0 +1,3 @@
|
|||||||
|
[defaults]
|
||||||
|
default_module_path=library
|
||||||
|
inventory=hosts.ini
|
||||||
@ -1,3 +0,0 @@
|
|||||||
[defaults]
|
|
||||||
default_module_path=ansible/library
|
|
||||||
inventory=hosts.ini
|
|
||||||
@ -1,25 +0,0 @@
|
|||||||
package portainer
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fmt"
|
|
||||||
|
|
||||||
"github.com/spf13/cobra"
|
|
||||||
)
|
|
||||||
|
|
||||||
var (
|
|
||||||
countFlagNumbers int
|
|
||||||
rangeFlagNumbers []string
|
|
||||||
)
|
|
||||||
var NumbersCmd = &cobra.Command{
|
|
||||||
Use: "numbers",
|
|
||||||
Short: "Returns random numbers",
|
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
|
||||||
fmt.Println("numbers mode")
|
|
||||||
fmt.Println("--count:", countFlagNumbers)
|
|
||||||
fmt.Println("--range:", rangeFlagNumbers)
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
func NewPortainerCommand() *cobra.Command {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
@ -1,26 +0,0 @@
|
|||||||
package cmd
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fmt"
|
|
||||||
"os"
|
|
||||||
|
|
||||||
"github.com/chatton/homelab/cmd/portainer"
|
|
||||||
"github.com/spf13/cobra"
|
|
||||||
)
|
|
||||||
|
|
||||||
func init() {
|
|
||||||
rootCmd.AddCommand(portainer.NewPortainerCommand())
|
|
||||||
}
|
|
||||||
|
|
||||||
var rootCmd = &cobra.Command{
|
|
||||||
Use: "randx",
|
|
||||||
Version: "1.0.1",
|
|
||||||
Short: "Returns random numbers or letters.",
|
|
||||||
}
|
|
||||||
|
|
||||||
func Execute() {
|
|
||||||
if err := rootCmd.Execute(); err != nil {
|
|
||||||
fmt.Println(err)
|
|
||||||
os.Exit(1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,18 +0,0 @@
|
|||||||
services:
|
|
||||||
audiobookshelf:
|
|
||||||
container_name: audiobookshelf
|
|
||||||
image: ghcr.io/advplyr/audiobookshelf:latest
|
|
||||||
environment:
|
|
||||||
- AUDIOBOOKSHELF_UID=99
|
|
||||||
- AUDIOBOOKSHELF_GID=100
|
|
||||||
ports:
|
|
||||||
- 13378:80
|
|
||||||
volumes:
|
|
||||||
- ${AUDIO_BOOKS_DIRECTORY}:/audiobooks
|
|
||||||
- ${PODCASTS_DIRECTORY}:/podcasts
|
|
||||||
- config:/config
|
|
||||||
- metadata:/metadata
|
|
||||||
volumes:
|
|
||||||
config:
|
|
||||||
metadata:
|
|
||||||
|
|
||||||
@ -1,14 +0,0 @@
|
|||||||
version: '3'
|
|
||||||
services:
|
|
||||||
bitwarden:
|
|
||||||
image: bitwardenrs/server
|
|
||||||
restart: always
|
|
||||||
ports:
|
|
||||||
- 80:80
|
|
||||||
volumes:
|
|
||||||
- data:/data
|
|
||||||
environment:
|
|
||||||
WEBSOCKET_ENABLED: 'true' # Required to use websockets
|
|
||||||
SIGNUPS_ALLOWED: 'false' # set to false to disable signups
|
|
||||||
volumes:
|
|
||||||
data:
|
|
||||||
@ -1,90 +0,0 @@
|
|||||||
# Details about config.
|
|
||||||
# https://gist.github.com/Lissy93/000f712a5ce98f212817d20bc16bab10
|
|
||||||
# https://github.com/Lissy93/dashy/blob/master/docs/configuring.md
|
|
||||||
# Widgets: https://github.com/Lissy93/dashy/blob/master/docs/widgets.md
|
|
||||||
---
|
|
||||||
pageInfo:
|
|
||||||
title: Home Lab
|
|
||||||
sections:
|
|
||||||
- name: Dashboards
|
|
||||||
widgets:
|
|
||||||
- type: gl-disk-space
|
|
||||||
options:
|
|
||||||
hostname: http://qnap:8083
|
|
||||||
items:
|
|
||||||
- title: Dash Dot
|
|
||||||
icon: hl-dashdot
|
|
||||||
url: "http://qnap:3010"
|
|
||||||
- title: Uptime Kuma
|
|
||||||
icon: hl-uptime-kuma
|
|
||||||
url: "http://qnap:3001"
|
|
||||||
- title: Tautulli
|
|
||||||
icon: hl-tautulli
|
|
||||||
url: "http://qnap:8182"
|
|
||||||
- title: Glances
|
|
||||||
icon: hl-glances
|
|
||||||
url: "http://qnap:8083"
|
|
||||||
- name: Media Stack
|
|
||||||
items:
|
|
||||||
- title: Plex
|
|
||||||
icon: hl-plex
|
|
||||||
url: "http://qnap:32400"
|
|
||||||
statusCheck: false
|
|
||||||
- title: Sonarr
|
|
||||||
icon: hl-sonarr
|
|
||||||
url: "http://qnap:8989"
|
|
||||||
- title: Radarr
|
|
||||||
icon: hl-radarr
|
|
||||||
url: "http://qnap:7878"
|
|
||||||
- title: Overseerr
|
|
||||||
icon: hl-overseerr
|
|
||||||
url: "http://qnap:5055"
|
|
||||||
- title: Jackett
|
|
||||||
icon: hl-jackett
|
|
||||||
url: "http://qnap:9117"
|
|
||||||
statusCheckUrl: "http://qnap:9117/health"
|
|
||||||
- title: Qbittorrent
|
|
||||||
icon: hl-qbittorrent
|
|
||||||
url: "http://qnap:15000"
|
|
||||||
- name: Tools
|
|
||||||
items:
|
|
||||||
- title: Photoprism
|
|
||||||
description: Manager photos
|
|
||||||
icon: hl-photoprism
|
|
||||||
url: "http://qnap:2342"
|
|
||||||
- title: Linkding
|
|
||||||
description: Manager photos
|
|
||||||
icon: hl-linkding
|
|
||||||
url: "http://qnap:9090"
|
|
||||||
- title: Nextcloud
|
|
||||||
icon: hl-nextcloud
|
|
||||||
url: "http://qnap:8081"
|
|
||||||
- title: Mealie
|
|
||||||
icon: hl-mealie
|
|
||||||
url: "https://mealie.cianhatton.ie"
|
|
||||||
- title: Gitea
|
|
||||||
icon: hl-gitea
|
|
||||||
url: "https://git.cianhatton.ie"
|
|
||||||
- name: System Admin
|
|
||||||
items:
|
|
||||||
- title: Portainer
|
|
||||||
description: Manage docker apps using Portainer
|
|
||||||
icon: hl-portainer
|
|
||||||
url: "http://qnap:9000"
|
|
||||||
- title: Webmin
|
|
||||||
icon: hl-webmin
|
|
||||||
url: "http://qnap:10000"
|
|
||||||
- title: Adminer
|
|
||||||
description: Manage MariaDB
|
|
||||||
icon: hl-adminer
|
|
||||||
url: "http://qnap:3307"
|
|
||||||
- title: Nginx Proxy Manager
|
|
||||||
description: Manage reverse proxies
|
|
||||||
icon: hl-nginx
|
|
||||||
url: "http://qnap:8181"
|
|
||||||
|
|
||||||
appConfig:
|
|
||||||
statusCheck: true
|
|
||||||
showSplashScreen: false
|
|
||||||
theme: dracula
|
|
||||||
language: en
|
|
||||||
@ -1,22 +0,0 @@
|
|||||||
version: '3.5'
|
|
||||||
services:
|
|
||||||
dashy:
|
|
||||||
# https://github.com/Lissy93/dashy
|
|
||||||
container_name: dashy
|
|
||||||
image: lissy93/dashy
|
|
||||||
volumes:
|
|
||||||
- ./dashy-config.yml:/app/public/conf.yml
|
|
||||||
ports:
|
|
||||||
- 80:80
|
|
||||||
environment:
|
|
||||||
- NODE_ENV=production
|
|
||||||
- UID=1000
|
|
||||||
- GID=1000
|
|
||||||
restart: always
|
|
||||||
# Configure healthchecks
|
|
||||||
healthcheck:
|
|
||||||
test: ['CMD', 'node', '/app/services/healthcheck']
|
|
||||||
interval: 1m30s
|
|
||||||
timeout: 10s
|
|
||||||
retries: 3
|
|
||||||
start_period: 40s
|
|
||||||
@ -1,15 +0,0 @@
|
|||||||
version: '3.1'
|
|
||||||
services:
|
|
||||||
db:
|
|
||||||
container_name: MariaDB
|
|
||||||
image: mariadb
|
|
||||||
restart: always
|
|
||||||
# default: 3306:3306
|
|
||||||
ports:
|
|
||||||
- ${HOST_PORT}:3306
|
|
||||||
volumes:
|
|
||||||
- data:/var/lib/mysql
|
|
||||||
- config:/etc/mysql/conf.d
|
|
||||||
volumes:
|
|
||||||
data:
|
|
||||||
config:
|
|
||||||
@ -1,15 +0,0 @@
|
|||||||
version: '3.2'
|
|
||||||
services:
|
|
||||||
portainer:
|
|
||||||
labels:
|
|
||||||
ie.cianhatton.backup.enabled: "true"
|
|
||||||
image: portainer/portainer-ce
|
|
||||||
container_name: "portainer"
|
|
||||||
ports:
|
|
||||||
- "9000:9000"
|
|
||||||
volumes:
|
|
||||||
- portainer_data:/data
|
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
|
||||||
|
|
||||||
volumes:
|
|
||||||
portainer_data:
|
|
||||||
@ -1,10 +0,0 @@
|
|||||||
module github.com/chatton/homelab
|
|
||||||
|
|
||||||
go 1.18
|
|
||||||
|
|
||||||
require github.com/spf13/cobra v1.5.0
|
|
||||||
|
|
||||||
require (
|
|
||||||
github.com/inconshreveable/mousetrap v1.0.0 // indirect
|
|
||||||
github.com/spf13/pflag v1.0.5 // indirect
|
|
||||||
)
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
package main
|
|
||||||
|
|
||||||
import "github.com/chatton/homelab/cmd"
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
cmd.Execute()
|
|
||||||
}
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue