Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy

Check warning on line 1 in .github/workflows/deploy.yml

View workflow job for this annotation

GitHub Actions / Run Pre-commit

1:1 [document-start] missing document start "---"
on:

Check warning on line 2 in .github/workflows/deploy.yml

View workflow job for this annotation

GitHub Actions / Run Pre-commit

2:1 [truthy] truthy value should be one of [false, true]
push:
branches:
Expand All @@ -17,14 +17,13 @@
ssh-private-key: ${{ secrets.VPS_SSH_KEY }}
- name: Copy files to VPS
run: |
rsync -avz --delete ./public/ ${{ secrets.VPS_USER }}@${{ secrets.VPS_HOST }}:~/Druv/

Check failure on line 20 in .github/workflows/deploy.yml

View workflow job for this annotation

GitHub Actions / Run Pre-commit

20:81 [line-length] line too long (95 > 80 characters)
env:
RSYNC_RSH: "ssh -o StrictHostKeyChecking=no"
- name: Deploy on VPS
run: |
ssh -o StrictHostKeyChecking=no ${{ secrets.VPS_USER }}@${{ secrets.VPS_HOST }} << 'EOF'

Check failure on line 25 in .github/workflows/deploy.yml

View workflow job for this annotation

GitHub Actions / Run Pre-commit

25:81 [line-length] line too long (98 > 80 characters)
cd ~/Druv/
export TS_AUTHKEY="${{ secrets.TS_AUTHKEY }}"
docker compose pull
docker compose up -d --remove-orphans
EOF
2 changes: 1 addition & 1 deletion public/.env.sample
Original file line number Diff line number Diff line change
@@ -1 +1 @@
TS_AUTHKEY=tskey-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
CLOUDFLARE_API_TOKEN=your-cloudflare-api-token-here
15 changes: 9 additions & 6 deletions public/Caddyfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
jellyfin.prinzpiuz.in {
reverse_proxy http://druv:8096
header_up Host {host}
header_up X-Real-IP {remote_host}
header_up X-Forwarded-For {remote_host}
header_up X-Forwarded-Proto {scheme}
{
http_port 8082
}

jellyfin.prinzpiuz.in:8920 {
reverse_proxy druv.tail04bc7f.ts.net:8096
tls {
dns cloudflare {env.CLOUDFLARE_API_TOKEN}
}
}
29 changes: 9 additions & 20 deletions public/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,17 @@
services:

Check warning on line 1 in public/docker-compose.yml

View workflow job for this annotation

GitHub Actions / Run Pre-commit

1:1 [document-start] missing document start "---"
tailscale:
image: tailscale/tailscale:stable
container_name: tailscale
hostname: '*.prinzpiuz.in'
privileged: true
network_mode: host
environment:
- TS_AUTHKEY=${TS_AUTHKEY}
- TS_STATE_DIR=/var/lib/tailscale
- TS_EXTRA_ARGS=--advertise-tags=tag:*.prinzpiuz.in
volumes:
- ./tailscale/state:/var/lib/tailscale
- /dev/net/tun:/dev/net/tun
restart: unless-stopped
caddy:
image: caddy:latest
image: caddybuilds/caddy-cloudflare:alpine
container_name: caddy_druv
depends_on:
- tailscale
ports:
- "80:80"
- "443:443"
network_mode: host
environment:
- CLOUDFLARE_API_TOKEN=${CLOUDFLARE_API_TOKEN}
env_file:
- .env
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile
- ./caddy_data:/data
- ./caddy_config:/config
ports:
- 8920:8920
- 8082:8082
restart: unless-stopped
Loading