Skip to content

Commit

Permalink
Refinement and update Grass image (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
XternA authored Nov 22, 2024
1 parent dafd531 commit 3dd1167
Show file tree
Hide file tree
Showing 13 changed files with 138 additions and 100 deletions.
48 changes: 24 additions & 24 deletions compose/compose.hosting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ services:
mem_limit: $RAM_LIMIT
mem_reservation: $RAM_RESERVE
logging:
driver: "json-file"
driver: json-file
options:
max-size: "10k"
max-file: "1"
max-size: 10k
max-file: 1

proxyrack:
container_name: proxyrack
Expand All @@ -45,10 +45,10 @@ services:
mem_limit: $RAM_LIMIT
mem_reservation: $RAM_RESERVE
logging:
driver: "json-file"
driver: json-file
options:
max-size: "10k"
max-file: "1"
max-size: 10k
max-file: 1

proxylite:
container_name: proxylite
Expand All @@ -69,10 +69,10 @@ services:
mem_limit: $RAM_LIMIT
mem_reservation: $RAM_RESERVE
logging:
driver: "json-file"
driver: json-file
options:
max-size: "10k"
max-file: "1"
max-size: 10k
max-file: 1

earnfm:
container_name: earnfm
Expand All @@ -92,10 +92,10 @@ services:
mem_limit: $RAM_LIMIT
mem_reservation: $RAM_RESERVE
logging:
driver: "json-file"
driver: json-file
options:
max-size: "10k"
max-file: "1"
max-size: 10k
max-file: 1

mysterium:
container_name: mysterium
Expand All @@ -120,10 +120,10 @@ services:
mem_limit: $RAM_LIMIT
mem_reservation: $RAM_RESERVE
logging:
driver: "json-file"
driver: json-file
options:
max-size: "10k"
max-file: "1"
max-size: 10k
max-file: 1

bitping:
container_name: bitping
Expand All @@ -146,10 +146,10 @@ services:
mem_limit: $RAM_LIMIT
mem_reservation: $RAM_RESERVE
logging:
driver: "json-file"
driver: json-file
options:
max-size: "10k"
max-file: "1"
max-size: 10k
max-file: 1

gaga-node:
container_name: gaga-node
Expand All @@ -169,10 +169,10 @@ services:
mem_limit: $RAM_LIMIT
mem_reservation: $RAM_RESERVE
logging:
driver: "json-file"
driver: json-file
options:
max-size: "10k"
max-file: "1"
max-size: 10k
max-file: 1

bearshare:
container_name: bearshare
Expand All @@ -193,10 +193,10 @@ services:
mem_limit: $RAM_LIMIT
mem_reservation: $RAM_RESERVE
logging:
driver: "json-file"
driver: json-file
options:
max-size: "10k"
max-file: "1"
max-size: 10k
max-file: 1

volumes:
bitping-data:
42 changes: 21 additions & 21 deletions compose/compose.local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ services:
mem_limit: $RAM_LIMIT
mem_reservation: $RAM_RESERVE
logging:
driver: "json-file"
driver: json-file
options:
max-size: "10k"
max-file: "1"
max-size: 10k
max-file: 1

packetstream:
container_name: packetstream
Expand All @@ -45,10 +45,10 @@ services:
mem_limit: $RAM_LIMIT
mem_reservation: $RAM_RESERVE
logging:
driver: "json-file"
driver: json-file
options:
max-size: "10k"
max-file: "1"
max-size: 10k
max-file: 1

speedshare:
container_name: speedshare
Expand All @@ -70,10 +70,10 @@ services:
mem_limit: $RAM_LIMIT
mem_reservation: $RAM_RESERVE
logging:
driver: "json-file"
driver: json-file
options:
max-size: "10k"
max-file: "1"
max-size: 10k
max-file: 1

spide:
container_name: spide
Expand All @@ -93,21 +93,21 @@ services:
mem_limit: $RAM_LIMIT
mem_reservation: $RAM_RESERVE
logging:
driver: "json-file"
driver: json-file
options:
max-size: "10k"
max-file: "1"
max-size: 10k
max-file: 1

grass:
container_name: grass
image: mrcolorrain/grass
image: mrcolorrain/grass-node
restart: always
hostname: $DEVICE_ID
labels:
- project=standard
environment:
- GRASS_USER=${GRASS_EMAIL:-}
- GRASS_PASS=${GRASS_PASSWORD:-}
- USER_EMAIL=${GRASS_EMAIL:-}
- USER_PASSWORD=${GRASS_PASSWORD:-}
profiles:
- ${GRASS:-DISABLED}
dns:
Expand All @@ -117,10 +117,10 @@ services:
mem_limit: $RAM_LIMIT
mem_reservation: $RAM_RESERVE
logging:
driver: "json-file"
driver: json-file
options:
max-size: "10k"
max-file: "1"
max-size: 10k
max-file: 1

nodepay:
container_name: nodepay
Expand All @@ -140,10 +140,10 @@ services:
mem_limit: $RAM_LIMIT
mem_reservation: $RAM_RESERVE
logging:
driver: "json-file"
driver: json-file
options:
max-size: "10k"
max-file: "1"
max-size: 10k
max-file: 1

volumes:
earnapp-data:
18 changes: 9 additions & 9 deletions compose/compose.service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ services:
mem_limit: $RAM_LIMIT
mem_reservation: $RAM_RESERVE
logging:
driver: "json-file"
driver: json-file
options:
max-size: "10k"
max-file: "1"
max-size: 10k
max-file: 1

bearshare-pot:
container_name: bearshare-pot
Expand All @@ -42,10 +42,10 @@ services:
mem_limit: $RAM_LIMIT
mem_reservation: $RAM_RESERVE
logging:
driver: "json-file"
driver: json-file
options:
max-size: "10k"
max-file: "1"
max-size: 10k
max-file: 1

packetshare-pot:
container_name: packetshare-pot
Expand All @@ -66,7 +66,7 @@ services:
mem_limit: $RAM_LIMIT
mem_reservation: $RAM_RESERVE
logging:
driver: "json-file"
driver: json-file
options:
max-size: "10k"
max-file: "1"
max-size: 10k
max-file: 1
18 changes: 9 additions & 9 deletions compose/compose.single.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ services:
mem_limit: $RAM_LIMIT
mem_reservation: $RAM_RESERVE
logging:
driver: "json-file"
driver: json-file
options:
max-size: "10k"
max-file: "1"
max-size: 10k
max-file: 1

pawns:
container_name: pawns
Expand All @@ -47,10 +47,10 @@ services:
mem_limit: $RAM_LIMIT
mem_reservation: $RAM_RESERVE
logging:
driver: "json-file"
driver: json-file
options:
max-size: "10k"
max-file: "1"
max-size: 10k
max-file: 1

packetshare:
container_name: packetshare
Expand All @@ -72,7 +72,7 @@ services:
mem_limit: $RAM_LIMIT
mem_reservation: $RAM_RESERVE
logging:
driver: "json-file"
driver: json-file
options:
max-size: "10k"
max-file: "1"
max-size: 10k
max-file: 1
12 changes: 6 additions & 6 deletions compose/compose.unlimited.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ services:
mem_limit: $RAM_LIMIT
mem_reservation: $RAM_RESERVE
logging:
driver: "json-file"
driver: json-file
options:
max-size: "10k"
max-file: "1"
max-size: 10k
max-file: 1

traffmonetizer:
container_name: traffmonetizer
Expand All @@ -43,7 +43,7 @@ services:
mem_limit: $RAM_LIMIT
mem_reservation: $RAM_RESERVE
logging:
driver: "json-file"
driver: json-file
options:
max-size: "10k"
max-file: "1"
max-size: 10k
max-file: 1
8 changes: 4 additions & 4 deletions compose/compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ services:
--include-stopped
--include-restarting
--revive-stopped
--interval "9000"
--interval 9000
dns:
- 1.1.1.1
- 8.8.8.8
Expand All @@ -22,7 +22,7 @@ services:
mem_limit: $RAM_LIMIT
mem_reservation: $RAM_RESERVE
logging:
driver: "json-file"
driver: json-file
options:
max-size: "10k"
max-file: "1"
max-size: 10k
max-file: 1
35 changes: 29 additions & 6 deletions scripts/container/container-config.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,32 @@
#!/bin/sh

export CONTAINER_ALIAS="docker"
print_no_runtime() {
printf "No $CONTAINER_ALIAS runtime installed.\nPlease install container runtime from tool menu.\n"
printf "\nPress Enter to continue..."; read input
}

if docker compose version > /dev/null 2>&1; then
export CONTAINER_COMPOSE="$CONTAINER_ALIAS compose"
else
export CONTAINER_COMPOSE="$CONTAINER_ALIAS-compose"
fi
register_compose() {
if $CONTAINER_ALIAS compose version > /dev/null 2>&1; then
export CONTAINER_COMPOSE="$CONTAINER_ALIAS compose"
else
export CONTAINER_COMPOSE="$CONTAINER_ALIAS-compose"
fi
}

register_runtime() {
export CONTAINER_ALIAS="docker"

if [ "$(uname)" = "Linux" ]; then
if [ -n "$WSL_DISTRO_NAME" ]; then
export HAS_CONTAINER_RUNTIME="$(where.exe $CONTAINER_ALIAS 2> /dev/null >&1)"
else
export HAS_CONTAINER_RUNTIME="$(command -v $CONTAINER_ALIAS 2> /dev/null 1>&1)"
fi
fi
register_compose
}

case "$1" in
--register) register_compose ;;
*) register_runtime ;;
esac
5 changes: 1 addition & 4 deletions scripts/docker-install.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
#!/bin/sh

has_docker=$(command -v docker 2> /dev/null 1>&1)

if [ "$(uname)" = "Linux" ]; then
if [ -n "$WSL_DISTRO_NAME" ]; then
OS="wsl"
has_docker="$(where.exe docker 2> /dev/null >&1)"
else
OS=$(awk -F= '/^ID=/{print $2}' /etc/os-release | tr -d '"')
fi
Expand Down Expand Up @@ -83,7 +80,7 @@ install_wsl() {
}

# -----[ Main ]----------------------------------------------------------
if [ ! "$has_docker" ]; then
if [ ! "$HAS_CONTAINER_RUNTIME" ]; then
case $OS in
centos | rhel)
install_centos
Expand Down
Loading

0 comments on commit 3dd1167

Please sign in to comment.