-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpodman.fish
More file actions
84 lines (67 loc) · 2.82 KB
/
Copy pathpodman.fish
File metadata and controls
84 lines (67 loc) · 2.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#!/usr/bin/env fish
# Docker is not used because Podman has built in provisions that work better from the ground up,
# Resource efficient, integrated into systemd, daemonless, rootless and less prone to breakages
# Only podman-docker package is present for compatibility
# Podman is built such that that utilities like watchtower are not needed
# Units podman.service podman.socket podman-auto-update.timer should be enabled
# ===================
# Pull images
# ===================
echo "📦 Pulling latest images..."
podman pull docker.io/thetorproject/snowflake-proxy:nightly \
\
docker.io/honeygain/honeygain \
docker.io/iproyal/pawns-cli:latest \
docker.io/earnfm/earnfm-client:latest \
docker.io/packetstream/psclient:latest \
# Parameters
## PW - Password
## UID - Token/Auth phrase
## MAIL - Email address
set -gx HONEYGAIN_MAIL ""
set -gx HONEYGAIN_PW ""
set -gx PAWNS_MAIL ""
set -gx PAWNS_PW ""
set -gx EARNFM_TK ""
set -gx PACKSTRM_TK ""
set -gx UNIV_MAIL "" # Use same mail for all services, if this variable has any value all other will use it
set -gx DEVICE_ID (hostname) # Use native hostname
# MAIL override
if test -n "$UNIV_MAIL"
# MAIL set universally
set -l targets HONEYGAIN_MAIL PAWNS_MAIL
for var in $targets
set -gx $var "$UNIV_MAIL"
end
end
# ===========================
# Create containers
# ===========================
# Format for each is,
# 1. Runner(always active, auto update label)
# 2. Container identity(container name, image used)
# 3. Arguments
# --- Honeygain ---
podman run --rm honeygain/honeygain -tou-get
podman run -d --restart always --label "io.containers.autoupdate=image" \
--name honeygain docker.io/honeygain/honeygain \
-email $HONEYGAIN_MAIL -pass $HONEYGAIN_PW -device $DEVICE_ID -tou-accept
# --- Pawns.app ---
podman run -d --restart always --label "io.containers.autoupdate=image" \
--name pawns-cli docker.io/iproyal/pawns-cli:latest \
-email=$PAWNS_MAIL -password=$PAWNS_PW -device-name=$DEVICE_ID -device-id=$DEVICE_ID -accept-tos
# --- EarnFM ---
podman run -d --restart always --label "io.containers.autoupdate=image" \
--name earnfm docker.io/earnfm/earnfm-client:latest \
-e EARNFM_TOKEN="$EARNFM_TK"
# --- PacketStream ---
podman run -d --restart always --label "io.containers.autoupdate=image" \
--name psclient docker.io/packetstream/psclient:latest \
-e CID="$PACKSTRM_TK"
# --- Tor Snowflake Bridge Hoster ---
podman run -d --restart always --label "io.containers.autoupdate=image" \
--name snowflake-proxy docker.io/thetorproject/snowflake-proxy:nightly \
-ephemeral-ports-range "30000:60000" -allow-non-tls-relay -allow-proxying-to-private-addresses -summary-interval 1h -metrics --net host
# Emergency actions
#podman rm -af # Remove all containers
#podman pod rm -af # Remove all pods