Skip to content

Commit 694690d

Browse files
authored
Merge pull request #4 from prinzpiuz/infra_setup
Infra setup
2 parents 8cbdb1f + bd75811 commit 694690d

File tree

4 files changed

+19
-28
lines changed

4 files changed

+19
-28
lines changed

.github/workflows/deploy.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ jobs:
2424
run: |
2525
ssh -o StrictHostKeyChecking=no ${{ secrets.VPS_USER }}@${{ secrets.VPS_HOST }} << 'EOF'
2626
cd ~/Druv/
27-
export TS_AUTHKEY="${{ secrets.TS_AUTHKEY }}"
2827
docker compose pull
2928
docker compose up -d --remove-orphans
3029
EOF

public/.env.sample

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
TS_AUTHKEY=tskey-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
1+
CLOUDFLARE_API_TOKEN=your-cloudflare-api-token-here

public/Caddyfile

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
jellyfin.prinzpiuz.in {
2-
reverse_proxy http://druv:8096
3-
header_up Host {host}
4-
header_up X-Real-IP {remote_host}
5-
header_up X-Forwarded-For {remote_host}
6-
header_up X-Forwarded-Proto {scheme}
1+
{
2+
http_port 8082
73
}
4+
5+
jellyfin.prinzpiuz.in:8920 {
6+
reverse_proxy druv.tail04bc7f.ts.net:8096
7+
tls {
8+
dns cloudflare {env.CLOUDFLARE_API_TOKEN}
9+
}
10+
}

public/docker-compose.yml

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,17 @@
11
services:
2-
tailscale:
3-
image: tailscale/tailscale:stable
4-
container_name: tailscale
5-
hostname: '*.prinzpiuz.in'
6-
privileged: true
7-
network_mode: host
8-
environment:
9-
- TS_AUTHKEY=${TS_AUTHKEY}
10-
- TS_STATE_DIR=/var/lib/tailscale
11-
- TS_EXTRA_ARGS=--advertise-tags=tag:*.prinzpiuz.in
12-
volumes:
13-
- ./tailscale/state:/var/lib/tailscale
14-
- /dev/net/tun:/dev/net/tun
15-
restart: unless-stopped
162
caddy:
17-
image: caddy:latest
3+
image: caddybuilds/caddy-cloudflare:alpine
184
container_name: caddy_druv
19-
depends_on:
20-
- tailscale
21-
ports:
22-
- "80:80"
23-
- "443:443"
5+
network_mode: host
6+
environment:
7+
- CLOUDFLARE_API_TOKEN=${CLOUDFLARE_API_TOKEN}
8+
env_file:
9+
- .env
2410
volumes:
2511
- ./Caddyfile:/etc/caddy/Caddyfile
2612
- ./caddy_data:/data
2713
- ./caddy_config:/config
14+
ports:
15+
- 8920:8920
16+
- 8082:8082
2817
restart: unless-stopped

0 commit comments

Comments
 (0)