Add sftpgo (wip)
This commit is contained in:
@@ -1,70 +0,0 @@
|
|||||||
|
|
||||||
data "docker_registry_image" "meshcore-capture" {
|
|
||||||
name = "ghcr.io/agessaman/meshcore-packet-capture:latest"
|
|
||||||
}
|
|
||||||
|
|
||||||
resource "docker_image" "meshcore-capture" {
|
|
||||||
name = data.docker_registry_image.meshcore-capture.name
|
|
||||||
pull_triggers = [data.docker_registry_image.meshcore-capture.sha256_digest]
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
resource "docker_container" "meshcore-capture" {
|
|
||||||
image = docker_image.meshcore-capture.image_id
|
|
||||||
name = "meshcore-capture"
|
|
||||||
restart = "always"
|
|
||||||
|
|
||||||
devices {
|
|
||||||
host_path = "/dev/serial/by-id/usb-Heltec_HT-n5262_8E03063C48F80143-if00"
|
|
||||||
container_path = "/dev/ttyUSB0"
|
|
||||||
permissions = "rwm"
|
|
||||||
}
|
|
||||||
|
|
||||||
env = [
|
|
||||||
"PACKETCAPTURE_CONNECTION_TYPE=TCP",
|
|
||||||
"PACKETCAPTURE_TCP_HOST=172.20.0.68",
|
|
||||||
"PACKETCAPTURE_MQTT1_ENABLED=true",
|
|
||||||
"PACKETCAPTURE_MQTT1_SERVER=mqtt-us-v1.letsmesh.net",
|
|
||||||
"PACKETCAPTURE_MQTT1_PORT=443",
|
|
||||||
"PACKETCAPTURE_MQTT1_TRANSPORT=websockets",
|
|
||||||
"PACKETCAPTURE_MQTT1_USE_TLS=true",
|
|
||||||
"PACKETCAPTURE_MQTT1_USE_AUTH_TOKEN=true",
|
|
||||||
"PACKETCAPTURE_MQTT1_TOKEN_AUDIENCE=mqtt-us-v1.letsmesh.net",
|
|
||||||
"PACKETCAPTURE_MQTT1_KEEPALIVE=120",
|
|
||||||
|
|
||||||
# MQTT Broker 2 - Let'sMesh Analyzer (EU)
|
|
||||||
"PACKETCAPTURE_MQTT2_ENABLED=true",
|
|
||||||
"PACKETCAPTURE_MQTT2_SERVER=mqtt-eu-v1.letsmesh.net",
|
|
||||||
"PACKETCAPTURE_MQTT2_PORT=443",
|
|
||||||
"PACKETCAPTURE_MQTT2_TRANSPORT=websockets",
|
|
||||||
"PACKETCAPTURE_MQTT2_USE_TLS=true",
|
|
||||||
"PACKETCAPTURE_MQTT2_USE_AUTH_TOKEN=true",
|
|
||||||
"PACKETCAPTURE_MQTT2_TOKEN_AUDIENCE=mqtt-eu-v1.letsmesh.net",
|
|
||||||
"PACKETCAPTURE_MQTT2_KEEPALIVE=120",
|
|
||||||
|
|
||||||
# Custom MQTT broker (optional - uncomment and configure as needed)
|
|
||||||
"PACKETCAPTURE_MQTT3_ENABLED=true",
|
|
||||||
"PACKETCAPTURE_MQTT3_SERVER=172.20.0.96",
|
|
||||||
"PACKETCAPTURE_MQTT3_PORT=1883",
|
|
||||||
"PACKETCAPTURE_MQTT3_USERNAME=meshcore",
|
|
||||||
"PACKETCAPTURE_MQTT3_PASSWORD=9a9U49NraE*@cF",
|
|
||||||
"PACKETCAPTURE_MQTT3_USE_TLS=false",
|
|
||||||
|
|
||||||
"PACKETCAPTURE_IATA=LWR",
|
|
||||||
"PACKETCAPTURE_ORIGIN=NL-DJJ-MCF MQTT Gorredijk",
|
|
||||||
]
|
|
||||||
|
|
||||||
mounts {
|
|
||||||
target = "/data"
|
|
||||||
source = "/var/lib/containers/meshcore-capture"
|
|
||||||
type = "bind"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
lifecycle {
|
|
||||||
ignore_changes = [
|
|
||||||
ulimit,
|
|
||||||
log_opts
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -146,4 +146,13 @@ resource "docker_volume" "truenas-borg" {
|
|||||||
device = "//172.20.0.188/borg"
|
device = "//172.20.0.188/borg"
|
||||||
o = "username=dqnap,password=vPKnUmApyQRE5$n,file_mode=0777,dir_mode=0777"
|
o = "username=dqnap,password=vPKnUmApyQRE5$n,file_mode=0777,dir_mode=0777"
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "docker_volume" "truenas-keepass" {
|
||||||
|
name = "truenas-keepass"
|
||||||
|
driver_opts = {
|
||||||
|
type = "cifs",
|
||||||
|
device = "//172.20.0.188/keepass"
|
||||||
|
o = "username=dqnap,password=vPKnUmApyQRE5$n,file_mode=0777,dir_mode=0777"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
|
||||||
|
data "docker_registry_image" "sftpgo" {
|
||||||
|
name = "drakkan/sftpgo:alpine"
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "docker_image" "sftpgo" {
|
||||||
|
name = data.docker_registry_image.sftpgo.name
|
||||||
|
pull_triggers = [data.docker_registry_image.sftpgo.sha256_digest]
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "docker_container" "sftpgo" {
|
||||||
|
image = docker_image.sftpgo.image_id
|
||||||
|
name = "sftpgo"
|
||||||
|
restart = "always"
|
||||||
|
|
||||||
|
env = [
|
||||||
|
"SFTPGO_GRACE_TIME=5",
|
||||||
|
"SFTPGO_COMMON__PROXY_PROTOCOL=2",
|
||||||
|
"SFTPGO_COMMON__PROXY_ALLOWED=192.168.3.29",
|
||||||
|
"SFTPGO_WEBDAVD__BINDINGS__0__PORT=8081",
|
||||||
|
"SFTPGO_WEBDAVD__BINDINGS__0__PREFIX=/dav",
|
||||||
|
"SFTPGO_WEBDAVD__BINDINGS__0__PROXY_MODE=1",
|
||||||
|
]
|
||||||
|
|
||||||
|
mounts {
|
||||||
|
target = "/srv/sftpgo/data"
|
||||||
|
source = "/var/lib/containers/sftpgo/data"
|
||||||
|
type = "bind"
|
||||||
|
}
|
||||||
|
|
||||||
|
mounts {
|
||||||
|
target = "/srv/sftpgo/backups"
|
||||||
|
source = "/var/lib/containers/sftpgo/backups"
|
||||||
|
type = "bind"
|
||||||
|
}
|
||||||
|
|
||||||
|
mounts {
|
||||||
|
target = "/var/lib/sftpgo"
|
||||||
|
source = "/var/lib/containers/sftpgo/home"
|
||||||
|
type = "bind"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
volumes {
|
||||||
|
container_path = "/storage/keepass"
|
||||||
|
volume_name = docker_volume.truenas-keepass.name
|
||||||
|
}
|
||||||
|
|
||||||
|
lifecycle {
|
||||||
|
ignore_changes = [
|
||||||
|
ulimit,
|
||||||
|
log_opts
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
networks_advanced {
|
||||||
|
name = docker_network.container-public.name
|
||||||
|
ipv4_address = "192.168.3.59"
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user