Skip to content

Commit 34734f1

Browse files
authored
Merge pull request #9 from prinzpiuz/infra_setup
chore: repo cleanup
2 parents 450ce93 + d2c2875 commit 34734f1

25 files changed

+157
-79
lines changed

.github/workflows/deploy.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,26 @@ jobs:
3131
docker compose pull
3232
docker compose up -d --remove-orphans
3333
EOF
34+
- name: Deployment Complete
35+
if: success()
36+
uses: appleboy/telegram-action@master
37+
with:
38+
to: ${{ secrets.TELEGRAM_TO }}
39+
token: ${{ secrets.TELEGRAM_TOKEN }}
40+
message: |
41+
Public Services Deployed Successfully!
42+
- name: Deployment Failed
43+
if: failure()
44+
uses: appleboy/telegram-action@master
45+
with:
46+
to: ${{ secrets.TELEGRAM_TO }}
47+
token: ${{ secrets.TELEGRAM_TOKEN }}
48+
message: |
49+
Alert! Deployment Failed for Druv Setup Scripts.
50+
Please check the GitHub Actions logs for more details.
51+
- name: Clean up old deployments
52+
if: success()
53+
run: |
54+
ssh -o StrictHostKeyChecking=no ${{ secrets.VPS_USER }}@${{ secrets.VPS_HOST }} << 'EOF'
55+
docker system prune -f
56+
EOF

.github/workflows/release.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Github Release
2+
on:
3+
push:
4+
branches:
5+
- main
6+
jobs:
7+
release:
8+
name: Github Release
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout repository
12+
uses: actions/checkout@v4
13+
- name: Get New Tag
14+
id: autoversion
15+
uses: ietf-tools/semver-action@v1
16+
with:
17+
token: ${{ secrets.GITHUB_TOKEN }}
18+
branch: main
19+
skipInvalidTags: true
20+
noVersionBumpBehavior: patch
21+
outputs:
22+
new_tag: ${{ steps.autoversion.outputs.nextStrict }}
23+
update-version-file:
24+
name: Update Version File
25+
needs: release
26+
runs-on: ubuntu-latest
27+
steps:
28+
- name: Checkout repository
29+
uses: actions/checkout@v4
30+
- name: Update VERSION file
31+
run: |
32+
NEW_VERSION="${{ needs.release.outputs.new_tag }}" && sed -i 's/^VERSION=.*$/VERSION="'"$NEW_VERSION"'"/' logo.sh
33+
- name: Commit and Push changes
34+
uses: stefanzweifel/git-auto-commit-action@v5
35+
with:
36+
commit_message: "chore: Auto-update version in logo.sh to ${{ needs.release.outputs.new_tag }}"
37+
file_pattern: "logo.sh"
38+
github-release:
39+
name: Create GitHub Release
40+
needs: release
41+
runs-on: ubuntu-latest
42+
steps:
43+
- name: Create GitHub Release
44+
uses: softprops/action-gh-release@v1
45+
with:
46+
tag_name: ${{ needs.release.outputs.new_tag }}
47+
name: Druv ${{ needs.release.outputs.new_tag }}
48+
env:
49+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ mybb/
33
mariadb/
44
postgres/
55
compose_restart.log
6+
.ssh

.pre-commit-config.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,3 @@ repos:
1212
rev: v0.20.0
1313
hooks:
1414
- id: yamlfmt
15-
# types: [yml]
16-
- repo: https://github.com/adrienverge/yamllint.git
17-
rev: v1.37.1
18-
hooks:
19-
- id: yamllint

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
| _ \ _ __ _ ___ __
44
| | | | '__| | | \ \ / /
55
| |_| | | | |_| |\ V /
6-
|____/|_| \__,_| \_/ v3.0
7-
Setup Scripts For A Media Server
6+
|____/|_| \__,_| \_/
7+
Setup Scripts For A HomelAB
88
99
```
1010
* **Create .env file**

arr/.env.sample

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# gluetun
2+
GLUETUN_IPV4_ADDR=gluetun_ip
3+
VPN_TYPE=vpn_type
4+
VPN_SERVICE_PROVIDER=vpn_provider
5+
WIREGUARD_PRIVATE_KEY=wireguard_private_key
6+
WIREGUARD_ADDRESSES=wireguard_addresses
7+
SERVER_CITIES=server_cities
8+
# arr
9+
SONARR_API_KEY=sonarr_api_key
10+
RADARR_API_KEY=radarr_api_key
11+
RADARR_IPV4_ADDR=172.18.0.30
12+
SONARR_IPV4_ADDR=172.18.0.31
13+
READARR_IPV4_ADDR=172.18.0.36
14+
FLARESOLVERR_IPV4_ADDR=172.18.0.32
15+
BAZARR_IPV4_ADDR=172.18.0.33
16+
QBIT_TORRENT_IPV4_ADDR=192.168.1.3
17+
QBIT_USER=druv
18+
QBIT_PASSWORD=password_here

arr/docker-compose.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,3 @@ services:
314314
- .env
315315
networks:
316316
- homelab
317-
318-
# networks:
319-
# arr:
320-
# external: true

backup/.env.sample

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
RESTIC_PASSWORD=restic_password_here
2+
RESTIC_REPO=restic_repo_here

backup/docker-compose.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,3 @@ services:
5555
- .env
5656
volumes:
5757
- /home/druv/.ssh:/run/secrets/.ssh:ro
58-
59-
# networks:
60-
# arr:
61-
# external: true

config_auto_push.sh

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)