mirror of
https://asciireactor.com/otho/stashbox
synced 2024-11-22 15:45:07 +00:00
Compare commits
No commits in common. "b02fa230ec0a3340c5f3654275fbe97f1cc2e4dc" and "80110e1bb79f5f049f4e2b73f57138b70c9ca361" have entirely different histories.
b02fa230ec
...
80110e1bb7
@ -22,8 +22,8 @@ tasks:
|
|||||||
default:
|
default:
|
||||||
- task: services
|
- task: services
|
||||||
|
|
||||||
run: ssh -qtt "$stashbox_domain" '{{.command}}'
|
run: ssh -qtt othostash.com '{{.command}}'
|
||||||
run-root: ssh -qtt "$stashbox_domain" 'su -l root -c "{{.command}}"'
|
run-root: ssh -qtt othostash.com 'su -l root -c "{{.command}}"'
|
||||||
|
|
||||||
exec:
|
exec:
|
||||||
- task: run
|
- task: run
|
||||||
@ -82,19 +82,10 @@ tasks:
|
|||||||
vars:
|
vars:
|
||||||
remote_path: "{{.ITEM}}"
|
remote_path: "{{.ITEM}}"
|
||||||
|
|
||||||
# Terraform
|
plan: source .env; terraform init; terraform plan
|
||||||
plan:
|
migrate-state: terraform init -migrate-state
|
||||||
- task: tf
|
|
||||||
vars:
|
|
||||||
CLI_ARGS: plan
|
|
||||||
apply:
|
|
||||||
- task: tf
|
|
||||||
vars:
|
|
||||||
CLI_ARGS: apply
|
|
||||||
tf: source .env; terraform init; terraform {{.CLI_ARGS}}
|
|
||||||
|
|
||||||
# Utilities
|
# Utilities
|
||||||
printenv: source .env; printenv
|
|
||||||
path-update: echo scp "{{.local_path}}" "$stashbox_domain:{{.remote_path}}"
|
path-update: echo scp "{{.local_path}}" "$stashbox_domain:{{.remote_path}}"
|
||||||
path-backup: scp "$stashbox_domain:{{.remote_path}}" "./.$(basename {{.remote_path}})-$(date +%s)" || echo "No file found."
|
path-backup: scp "$stashbox_domain:{{.remote_path}}" "./.$(basename {{.remote_path}})-$(date +%s)" || echo "No file found."
|
||||||
path-diff:
|
path-diff:
|
||||||
|
45
dns.tf
45
dns.tf
@ -10,62 +10,71 @@ terraform {
|
|||||||
|
|
||||||
provider "namecheap" {}
|
provider "namecheap" {}
|
||||||
|
|
||||||
variable "stashbox_domain" {
|
variable "stash_domain" {
|
||||||
type = string
|
type = string
|
||||||
default = "web.stash"
|
default = "web.stash"
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "stashbox_web_addr" {
|
variable "web_addr" {
|
||||||
type = string
|
type = string
|
||||||
default = "::db"
|
default = "::db"
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "stashbox_feed_addr" {
|
variable "feed_addr" {
|
||||||
type = string
|
type = string
|
||||||
default = "::feed"
|
default = "::feed"
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "stashbox_ip4_ext" {
|
variable "app_addr" {
|
||||||
|
type = string
|
||||||
|
default = "::beef"
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "ip4_ext" {
|
||||||
type = string
|
type = string
|
||||||
default = "0.0.0.0"
|
default = "0.0.0.0"
|
||||||
}
|
}
|
||||||
|
|
||||||
resource "namecheap_domain_records" "stashbox" {
|
resource "namecheap_domain_records" "stash" {
|
||||||
domain = var.stashbox_domain
|
domain = var.stash_domain
|
||||||
record {
|
record {
|
||||||
hostname = "www"
|
hostname = "www"
|
||||||
address = var.stashbox_web_addr
|
address = var.web_addr
|
||||||
type = "AAAA"
|
type = "AAAA"
|
||||||
ttl = 1799
|
|
||||||
}
|
}
|
||||||
record {
|
record {
|
||||||
hostname = "www"
|
hostname = "www"
|
||||||
address = var.stashbox_ip4_ext
|
address = var.ip4_ext
|
||||||
type = "A"
|
type = "A"
|
||||||
ttl = 1799
|
|
||||||
}
|
}
|
||||||
record {
|
record {
|
||||||
hostname = "feed"
|
hostname = "feed"
|
||||||
address = var.stashbox_feed_addr
|
address = var.feed_addr
|
||||||
type = "AAAA"
|
type = "AAAA"
|
||||||
ttl = 1799
|
|
||||||
}
|
}
|
||||||
record {
|
record {
|
||||||
hostname = "feed"
|
hostname = "feed"
|
||||||
address = var.stashbox_ip4_ext
|
address = var.ip4_ext
|
||||||
|
type = "A"
|
||||||
|
}
|
||||||
|
record {
|
||||||
|
hostname = "app"
|
||||||
|
address = var.app_addr
|
||||||
|
type = "AAAA"
|
||||||
|
}
|
||||||
|
record {
|
||||||
|
hostname = "app"
|
||||||
|
address = var.ip4_ext
|
||||||
type = "A"
|
type = "A"
|
||||||
ttl = 1799
|
|
||||||
}
|
}
|
||||||
record {
|
record {
|
||||||
hostname = "@"
|
hostname = "@"
|
||||||
address = "www.${var.stashbox_domain}."
|
address = "www.${var.stash_domain}"
|
||||||
type = "CNAME"
|
type = "CNAME"
|
||||||
ttl = 1799
|
|
||||||
}
|
}
|
||||||
record {
|
record {
|
||||||
hostname = "plex"
|
hostname = "plex"
|
||||||
address = "feed.${var.stashbox_domain}."
|
address = "feed.${var.stash_domain}"
|
||||||
type = "CNAME"
|
type = "CNAME"
|
||||||
ttl = 1799
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user