-
Notifications
You must be signed in to change notification settings - Fork 2
/
compose.yaml
33 lines (33 loc) · 1.34 KB
/
compose.yaml
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
services:
cryptosaga:
image: ubuntu:24.04
container_name: cryptosaga-ctn
restart: always
ports:
- "__PORT_MAINNET__:__PORT_MAINNET__" # TCP mainnet port
- "__RPCPORT_MAINNET__:__RPCPORT_MAINNET__" # RPC mainnet port
volumes:
- ${HOME}/.cryptosaga:/root/.cryptosaga:shared
command:
- bash
- -c
- |
if [ ! -f /usr/local/bin/cryptosagad ]; then
echo "CryptoSaga binary not found, setting up environment..."
apt-get update && \
apt-get install -y wget curl unzip && \
rm -rf /var/lib/apt/lists/* && \
echo $(curl -s https://api.github.com/repos/decenomy/SAGA/releases/latest | grep "browser_download_url" | grep -E "Linux(-x64)?\.zip" | cut -d '"' -f 4) > latest_release_url && \
echo "Latest release URL: $(cat latest_release_url)" && \
echo $(basename "$(cat latest_release_url)") > latest_filename && \
echo "Latest filename: $(cat latest_filename)" && \
wget "$(cat latest_release_url)" && \
unzip -q "$(cat latest_filename)" && \
rm "$(cat latest_filename)" && \
rm latest_filename && \
rm latest_release_url && \
mv cryptosaga* /usr/local/bin;
else
echo "CryptoSaga binary already installed, skipping setup."
fi
cryptosagad