-
Notifications
You must be signed in to change notification settings - Fork 24
/
compose.yaml
33 lines (33 loc) · 1.36 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:
__decenomy__:
image: ubuntu:24.04
container_name: __decenomy__-ctn
restart: always
ports:
- "__PORT_MAINNET__:__PORT_MAINNET__" # TCP mainnet port
- "__RPCPORT_MAINNET__:__RPCPORT_MAINNET__" # RPC mainnet port
volumes:
- ${HOME}/.__decenomy__:/root/.__decenomy__:shared
command:
- bash
- -c
- |
if [ ! -f /usr/local/bin/__decenomy__d ]; then
echo "__Decenomy__ 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/__DSW__/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 __decenomy__* /usr/local/bin;
else
echo "__Decenomy__ binary already installed, skipping setup."
fi
__decenomy__d