Frank refactoring part 1

This commit is contained in:
2026-08-30 04:41:27 +00:00
parent 85a063c1a7
commit ae69c2fafe
37 changed files with 301 additions and 210 deletions
-1
View File
@@ -1 +0,0 @@
docker build --file /home/{{ user }}/dockerfile/app/frank.Dockerfile --tag frank:latest /home/{{ user }}/dockerfile/app
-4
View File
@@ -1,4 +0,0 @@
Host {{ server }} {{ server }}.tanshu.com
HostName {{ server }}.tanshu.com
IdentityFile ~/.ssh/id_ed25519
User tanshu
-5
View File
@@ -1,5 +0,0 @@
NATS_URL=nats://localhost:4222
DURABLE={{ queue_name }}
SUBJECT="barker.print"
STREAM="barker_print_stream"
ADDRESS={{ printer_port }}
-15
View File
@@ -1,15 +0,0 @@
[Unit]
Description=Frank container service
After=docker.service {{ server }}-redis-tunnel.service
Wants=network-online.target docker.socket {{ server }}-redis-tunnel.service
Requires=docker.socket {{ server }}-redis-tunnel.service
PartOf={{ server }}-redis-tunnel.service
[Service]
Restart=always
RestartSec=3
ExecStart=/usr/bin/docker start -a frank
ExecStop=/usr/bin/docker stop -t 10 frank
[Install]
WantedBy=multi-user.target
-1
View File
@@ -1 +0,0 @@
docker run --detach --name frank --env-file=/home/{{ user }}/frank.env --network=host --restart=no --device /dev/usb/lp0:/printer frank:latest
-16
View File
@@ -1,16 +0,0 @@
[Unit]
Description=Reverse SSH connection
After=network.target
[Service]
Type=simple
User={{ user }}
ExecStart=/usr/bin/ssh -NTg -o ServerAliveInterval=60 -o ExitOnForwardFailure=yes -o ServerAliveCountMax=3 -o StrictHostKeyChecking=no -i /home/{{ user }}/.ssh/id_ed25519 -R {{ ssh_port }}:localhost:22 tanshu@{{ server }}.tanshu.com
# Restart every >2 seconds to avoid StartLimitInterval failure
Restart=always
RestartSec=5s
[Install]
WantedBy=default.target
-15
View File
@@ -1,15 +0,0 @@
[Unit]
Description=Keep ssh tunnel to specified remote host open
After=network.target
[Service]
User={{ user }}
ExecStart=/usr/bin/ssh -NT -o ServerAliveInterval=30 -o ExitOnForwardFailure=yes -o ServerAliveCountMax=2 -o StrictHostKeyChecking=no -i /home/{{ user }}/.ssh/id_ed25519 -L 4222:localhost:4222 tanshu@{{ server }}.tanshu.com
# Restart every >2 seconds to avoid StartLimitInterval failure
RestartSec=5
Restart=always
[Install]
WantedBy=multi-user.target