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