|
|
|
|
@@ -245,7 +245,9 @@ if ! $DOCKER ps --format '{{.Names}}' 2>/dev/null | grep -qE 'bitcoin-knots|arch
|
|
|
|
|
BTC_DBCACHE=4096
|
|
|
|
|
log " Large disk (${DISK_GB}GB) — enabling txindex"
|
|
|
|
|
fi
|
|
|
|
|
if $DOCKER run -d --name bitcoin-knots --restart unless-stopped --memory=$(mem_limit bitcoin-knots) --network archy-net \
|
|
|
|
|
if $DOCKER run -d --name bitcoin-knots --restart unless-stopped \
|
|
|
|
|
--health-cmd="bitcoin-cli -rpcuser=\$BITCOIN_RPC_USER -rpcpassword=\$BITCOIN_RPC_PASS getblockchaininfo || exit 1" --health-interval=30s --health-timeout=5s --health-retries=3 \
|
|
|
|
|
--memory=$(mem_limit bitcoin-knots) --network archy-net \
|
|
|
|
|
--cap-drop ALL --cap-add CHOWN --cap-add FOWNER --cap-add SETUID --cap-add SETGID --cap-add DAC_OVERRIDE \
|
|
|
|
|
--security-opt no-new-privileges:true \
|
|
|
|
|
-p 8332:8332 -p 8333:8333 \
|
|
|
|
|
@@ -277,7 +279,9 @@ fi
|
|
|
|
|
if ! $DOCKER ps -a --format '{{.Names}}' 2>/dev/null | grep -qE 'archy-mempool-db|mysql-mempool'; then
|
|
|
|
|
log "Creating mysql-mempool..."
|
|
|
|
|
mkdir -p /var/lib/archipelago/mysql-mempool
|
|
|
|
|
$DOCKER run -d --name archy-mempool-db --restart unless-stopped --memory=$(mem_limit archy-mempool-db) --network archy-net \
|
|
|
|
|
$DOCKER run -d --name archy-mempool-db --restart unless-stopped \
|
|
|
|
|
--health-cmd="mariadb -uroot -e 'SELECT 1' || exit 1" --health-interval=30s --health-timeout=5s --health-retries=3 \
|
|
|
|
|
--memory=$(mem_limit archy-mempool-db) --network archy-net \
|
|
|
|
|
-v /var/lib/archipelago/mysql-mempool:/var/lib/mysql \
|
|
|
|
|
-e MYSQL_DATABASE=mempool -e MYSQL_USER=mempool -e MYSQL_PASSWORD=$MEMPOOL_DB_PASS \
|
|
|
|
|
-e MYSQL_ROOT_PASSWORD=$MYSQL_ROOT_PASS \
|
|
|
|
|
@@ -294,7 +298,9 @@ if ! $DOCKER ps --format '{{.Names}}' 2>/dev/null | grep -q electrumx; then
|
|
|
|
|
else
|
|
|
|
|
log "Creating electrumx..."
|
|
|
|
|
mkdir -p /var/lib/archipelago/electrumx
|
|
|
|
|
$DOCKER run -d --name electrumx --restart unless-stopped --memory=$(mem_limit electrumx) --network archy-net \
|
|
|
|
|
$DOCKER run -d --name electrumx --restart unless-stopped \
|
|
|
|
|
--health-cmd="curl -sf http://localhost:8000/ || exit 1" --health-interval=30s --health-timeout=5s --health-retries=3 \
|
|
|
|
|
--memory=$(mem_limit electrumx) --network archy-net \
|
|
|
|
|
-p 50001:50001 -v /var/lib/archipelago/electrumx:/data \
|
|
|
|
|
-e "DAEMON_URL=http://$BITCOIN_RPC_USER:$BITCOIN_RPC_PASS@bitcoin-knots:8332/" \
|
|
|
|
|
-e COIN=Bitcoin -e DB_DIRECTORY=/data \
|
|
|
|
|
@@ -306,7 +312,9 @@ fi
|
|
|
|
|
if ! $DOCKER ps --format '{{.Names}}' 2>/dev/null | grep -q mempool-api; then
|
|
|
|
|
log "Creating mempool-api..."
|
|
|
|
|
mkdir -p /var/lib/archipelago/mempool
|
|
|
|
|
$DOCKER run -d --name mempool-api --restart unless-stopped --memory=$(mem_limit mempool-api) --network archy-net \
|
|
|
|
|
$DOCKER run -d --name mempool-api --restart unless-stopped \
|
|
|
|
|
--health-cmd="curl -sf http://localhost:8999/ || exit 1" --health-interval=30s --health-timeout=5s --health-retries=3 \
|
|
|
|
|
--memory=$(mem_limit mempool-api) --network archy-net \
|
|
|
|
|
-p 8999:8999 -v /var/lib/archipelago/mempool:/data \
|
|
|
|
|
-e MEMPOOL_BACKEND=electrum -e ELECTRUM_HOST=electrumx -e ELECTRUM_PORT=50001 \
|
|
|
|
|
-e ELECTRUM_TLS_ENABLED=false -e CORE_RPC_HOST="$TARGET_IP" -e CORE_RPC_PORT=8332 \
|
|
|
|
|
@@ -318,7 +326,9 @@ fi
|
|
|
|
|
|
|
|
|
|
if ! $DOCKER ps --format '{{.Names}}' 2>/dev/null | grep -qE 'archy-mempool-web|mempool-web'; then
|
|
|
|
|
log "Creating mempool frontend..."
|
|
|
|
|
$DOCKER run -d --name archy-mempool-web --restart unless-stopped --memory=$(mem_limit archy-mempool-web) --network archy-net \
|
|
|
|
|
$DOCKER run -d --name archy-mempool-web --restart unless-stopped \
|
|
|
|
|
--health-cmd="curl -sf http://localhost:8080/ || exit 1" --health-interval=30s --health-timeout=5s --health-retries=3 \
|
|
|
|
|
--memory=$(mem_limit archy-mempool-web) --network archy-net \
|
|
|
|
|
-p 4080:8080 -e FRONTEND_HTTP_PORT=8080 -e BACKEND_MAINNET_HTTP_HOST=mempool-api \
|
|
|
|
|
docker.io/mempool/frontend:v2.5.0 2>>"$LOG" || true
|
|
|
|
|
fi
|
|
|
|
|
@@ -328,13 +338,16 @@ if ! $DOCKER ps --format '{{.Names}}' 2>/dev/null | grep -q electrs-ui; then
|
|
|
|
|
if $DOCKER images --format '{{.Repository}}:{{.Tag}}' 2>/dev/null | grep -q 'electrs-ui'; then
|
|
|
|
|
log "Starting ElectrumX UI from pre-built image..."
|
|
|
|
|
$DOCKER run -d --name archy-electrs-ui --network host --restart unless-stopped \
|
|
|
|
|
--health-cmd="curl -sf http://localhost:80/ || exit 1" --health-interval=30s --health-timeout=5s --health-retries=3 \
|
|
|
|
|
localhost/electrs-ui:latest 2>>"$LOG" || \
|
|
|
|
|
$DOCKER run -d --name archy-electrs-ui --network host --restart unless-stopped \
|
|
|
|
|
--health-cmd="curl -sf http://localhost:80/ || exit 1" --health-interval=30s --health-timeout=5s --health-retries=3 \
|
|
|
|
|
electrs-ui:latest 2>>"$LOG" || true
|
|
|
|
|
elif [ -d /opt/archipelago/docker/electrs-ui ]; then
|
|
|
|
|
log "Building and starting ElectrumX UI from source..."
|
|
|
|
|
$DOCKER build -t electrs-ui:latest /opt/archipelago/docker/electrs-ui 2>>"$LOG" && \
|
|
|
|
|
$DOCKER run -d --name archy-electrs-ui --network host --restart unless-stopped \
|
|
|
|
|
--health-cmd="curl -sf http://localhost:80/ || exit 1" --health-interval=30s --health-timeout=5s --health-retries=3 \
|
|
|
|
|
electrs-ui:latest 2>>"$LOG" || true
|
|
|
|
|
else
|
|
|
|
|
log "ElectrumX UI: no image or source found, skipping"
|
|
|
|
|
@@ -345,7 +358,9 @@ fi
|
|
|
|
|
if ! $DOCKER ps -a --format '{{.Names}}' 2>/dev/null | grep -qE 'archy-btcpay-db|postgres-btcpay'; then
|
|
|
|
|
log "Creating PostgreSQL for BTCPay..."
|
|
|
|
|
mkdir -p /var/lib/archipelago/postgres-btcpay
|
|
|
|
|
$DOCKER run -d --name archy-btcpay-db --restart unless-stopped --memory=$(mem_limit archy-btcpay-db) --network archy-net \
|
|
|
|
|
$DOCKER run -d --name archy-btcpay-db --restart unless-stopped \
|
|
|
|
|
--health-cmd="pg_isready -U postgres || exit 1" --health-interval=30s --health-timeout=5s --health-retries=3 \
|
|
|
|
|
--memory=$(mem_limit archy-btcpay-db) --network archy-net \
|
|
|
|
|
-v /var/lib/archipelago/postgres-btcpay:/var/lib/postgresql/data \
|
|
|
|
|
-e POSTGRES_DB=btcpay -e POSTGRES_USER=btcpay -e POSTGRES_PASSWORD=$BTCPAY_DB_PASS \
|
|
|
|
|
docker.io/postgres:15-alpine 2>>"$LOG" || true
|
|
|
|
|
@@ -363,7 +378,9 @@ if ! $DOCKER ps --format '{{.Names}}' 2>/dev/null | grep -q archy-nbxplorer; the
|
|
|
|
|
else
|
|
|
|
|
log "Creating NBXplorer..."
|
|
|
|
|
mkdir -p /var/lib/archipelago/nbxplorer
|
|
|
|
|
$DOCKER run -d --name archy-nbxplorer --restart unless-stopped --memory=$(mem_limit archy-nbxplorer) --network archy-net \
|
|
|
|
|
$DOCKER run -d --name archy-nbxplorer --restart unless-stopped \
|
|
|
|
|
--health-cmd="curl -sf http://localhost:32838/ || exit 1" --health-interval=30s --health-timeout=5s --health-retries=3 \
|
|
|
|
|
--memory=$(mem_limit archy-nbxplorer) --network archy-net \
|
|
|
|
|
-p 32838:32838 -v /var/lib/archipelago/nbxplorer:/data \
|
|
|
|
|
-e NBXPLORER_DATADIR=/data -e NBXPLORER_NETWORK=mainnet -e NBXPLORER_CHAINS=btc \
|
|
|
|
|
-e NBXPLORER_BIND=0.0.0.0:32838 -e NBXPLORER_BTCRPCURL=http://bitcoin-knots:8332 \
|
|
|
|
|
@@ -376,7 +393,9 @@ fi
|
|
|
|
|
if ! $DOCKER ps --format '{{.Names}}' 2>/dev/null | grep -q btcpay-server; then
|
|
|
|
|
log "Creating BTCPay Server..."
|
|
|
|
|
mkdir -p /var/lib/archipelago/btcpay
|
|
|
|
|
$DOCKER run -d --name btcpay-server --restart unless-stopped --memory=$(mem_limit btcpay-server) --network archy-net \
|
|
|
|
|
$DOCKER run -d --name btcpay-server --restart unless-stopped \
|
|
|
|
|
--health-cmd="curl -sf http://localhost:49392/ || exit 1" --health-interval=30s --health-timeout=5s --health-retries=3 \
|
|
|
|
|
--memory=$(mem_limit btcpay-server) --network archy-net \
|
|
|
|
|
--cap-drop ALL --cap-add CHOWN --cap-add SETUID --cap-add SETGID --cap-add DAC_OVERRIDE \
|
|
|
|
|
--security-opt no-new-privileges:true \
|
|
|
|
|
-p 23000:49392 -v /var/lib/archipelago/btcpay:/datadir \
|
|
|
|
|
@@ -426,7 +445,9 @@ autopilot.active=false
|
|
|
|
|
LNDCONF
|
|
|
|
|
log "LND config created (rpcauth credentials, Tor via system)"
|
|
|
|
|
fi
|
|
|
|
|
$DOCKER run -d --name lnd --restart unless-stopped --memory=$(mem_limit lnd) --network archy-net \
|
|
|
|
|
$DOCKER run -d --name lnd --restart unless-stopped \
|
|
|
|
|
--health-cmd="curl -sf --insecure https://localhost:8080/v1/getinfo || exit 1" --health-interval=30s --health-timeout=5s --health-retries=3 \
|
|
|
|
|
--memory=$(mem_limit lnd) --network archy-net \
|
|
|
|
|
--cap-drop ALL --cap-add CHOWN --cap-add FOWNER --cap-add SETUID --cap-add SETGID --cap-add DAC_OVERRIDE \
|
|
|
|
|
--security-opt no-new-privileges:true \
|
|
|
|
|
-p 9735:9735 -p 10009:10009 -p 8080:8080 \
|
|
|
|
|
@@ -438,7 +459,9 @@ fi
|
|
|
|
|
if ! $DOCKER ps --format '{{.Names}}' 2>/dev/null | grep -q fedimint; then
|
|
|
|
|
log "Creating Fedimint..."
|
|
|
|
|
mkdir -p /var/lib/archipelago/fedimint
|
|
|
|
|
$DOCKER run -d --name fedimint --restart unless-stopped --memory=$(mem_limit fedimint) --network archy-net \
|
|
|
|
|
$DOCKER run -d --name fedimint --restart unless-stopped \
|
|
|
|
|
--health-cmd="curl -sf http://localhost:8174/ || exit 1" --health-interval=30s --health-timeout=5s --health-retries=3 \
|
|
|
|
|
--memory=$(mem_limit fedimint) --network archy-net \
|
|
|
|
|
--cap-drop ALL --cap-add CHOWN --cap-add FOWNER --cap-add SETUID --cap-add SETGID --cap-add DAC_OVERRIDE \
|
|
|
|
|
--security-opt no-new-privileges:true \
|
|
|
|
|
-p 8173:8173 -p 8174:8174 -p 8175:8175 \
|
|
|
|
|
@@ -460,7 +483,9 @@ if ! $DOCKER ps --format '{{.Names}}' 2>/dev/null | grep -q fedimint-gateway; th
|
|
|
|
|
LND_MACAROON=/var/lib/archipelago/lnd/data/chain/bitcoin/mainnet/admin.macaroon
|
|
|
|
|
if $DOCKER ps --format '{{.Names}}' 2>/dev/null | grep -q '^lnd$' && [ -f "$LND_CERT" ] && [ -f "$LND_MACAROON" ]; then
|
|
|
|
|
log " LND detected — using lnd mode"
|
|
|
|
|
$DOCKER run -d --name fedimint-gateway --restart unless-stopped --memory=$(mem_limit fedimint-gateway) --network archy-net \
|
|
|
|
|
$DOCKER run -d --name fedimint-gateway --restart unless-stopped \
|
|
|
|
|
--health-cmd="curl -sf http://localhost:8175/ || exit 1" --health-interval=30s --health-timeout=5s --health-retries=3 \
|
|
|
|
|
--memory=$(mem_limit fedimint-gateway) --network archy-net \
|
|
|
|
|
--cap-drop ALL --cap-add CHOWN --cap-add FOWNER --cap-add SETUID --cap-add SETGID --cap-add DAC_OVERRIDE \
|
|
|
|
|
--security-opt no-new-privileges:true \
|
|
|
|
|
-p 8176:8176 \
|
|
|
|
|
@@ -475,7 +500,9 @@ if ! $DOCKER ps --format '{{.Names}}' 2>/dev/null | grep -q fedimint-gateway; th
|
|
|
|
|
lnd --lnd-rpc-host "$TARGET_IP":10009 --lnd-tls-cert /lnd/tls.cert --lnd-macaroon /lnd/admin.macaroon 2>>"$LOG" || true
|
|
|
|
|
else
|
|
|
|
|
log " No LND found — using ldk (built-in Lightning)"
|
|
|
|
|
$DOCKER run -d --name fedimint-gateway --restart unless-stopped --memory=$(mem_limit fedimint-gateway) --network archy-net \
|
|
|
|
|
$DOCKER run -d --name fedimint-gateway --restart unless-stopped \
|
|
|
|
|
--health-cmd="curl -sf http://localhost:8175/ || exit 1" --health-interval=30s --health-timeout=5s --health-retries=3 \
|
|
|
|
|
--memory=$(mem_limit fedimint-gateway) --network archy-net \
|
|
|
|
|
--cap-drop ALL --cap-add CHOWN --cap-add FOWNER --cap-add SETUID --cap-add SETGID --cap-add DAC_OVERRIDE \
|
|
|
|
|
--security-opt no-new-privileges:true \
|
|
|
|
|
-p 8176:8176 -p 9737:9737 \
|
|
|
|
|
@@ -497,7 +524,9 @@ sleep 5 # Let core services stabilize
|
|
|
|
|
if ! $DOCKER ps --format '{{.Names}}' 2>/dev/null | grep -qE 'homeassistant|home-assistant'; then
|
|
|
|
|
log "Creating Home Assistant..."
|
|
|
|
|
mkdir -p /var/lib/archipelago/home-assistant
|
|
|
|
|
$DOCKER run -d --name homeassistant --restart unless-stopped --memory=$(mem_limit homeassistant) \
|
|
|
|
|
$DOCKER run -d --name homeassistant --restart unless-stopped \
|
|
|
|
|
--health-cmd="curl -sf http://localhost:8123/ || exit 1" --health-interval=30s --health-timeout=5s --health-retries=3 \
|
|
|
|
|
--memory=$(mem_limit homeassistant) \
|
|
|
|
|
--cap-drop ALL --cap-add CHOWN --cap-add SETUID --cap-add SETGID --cap-add DAC_OVERRIDE \
|
|
|
|
|
--security-opt no-new-privileges:true \
|
|
|
|
|
-p 8123:8123 -v /var/lib/archipelago/home-assistant:/config \
|
|
|
|
|
@@ -510,7 +539,9 @@ if ! $DOCKER ps --format '{{.Names}}' 2>/dev/null | grep -q grafana; then
|
|
|
|
|
log "Creating Grafana..."
|
|
|
|
|
mkdir -p /var/lib/archipelago/grafana
|
|
|
|
|
chown 472:472 /var/lib/archipelago/grafana 2>/dev/null || true
|
|
|
|
|
$DOCKER run -d --name grafana --restart unless-stopped --memory=$(mem_limit grafana) \
|
|
|
|
|
$DOCKER run -d --name grafana --restart unless-stopped \
|
|
|
|
|
--health-cmd="curl -sf http://localhost:3000/api/health || exit 1" --health-interval=30s --health-timeout=5s --health-retries=3 \
|
|
|
|
|
--memory=$(mem_limit grafana) \
|
|
|
|
|
--cap-drop ALL --cap-add CHOWN --cap-add SETUID --cap-add SETGID \
|
|
|
|
|
--security-opt no-new-privileges:true \
|
|
|
|
|
--read-only --tmpfs /tmp:rw,noexec,nosuid,size=256m --tmpfs /run:rw,noexec,nosuid,size=64m \
|
|
|
|
|
@@ -521,7 +552,9 @@ fi
|
|
|
|
|
if ! $DOCKER ps --format '{{.Names}}' 2>/dev/null | grep -q uptime-kuma; then
|
|
|
|
|
log "Creating Uptime Kuma..."
|
|
|
|
|
mkdir -p /var/lib/archipelago/uptime-kuma
|
|
|
|
|
$DOCKER run -d --name uptime-kuma --restart unless-stopped --memory=$(mem_limit uptime-kuma) \
|
|
|
|
|
$DOCKER run -d --name uptime-kuma --restart unless-stopped \
|
|
|
|
|
--health-cmd="curl -sf http://localhost:3001/ || exit 1" --health-interval=30s --health-timeout=5s --health-retries=3 \
|
|
|
|
|
--memory=$(mem_limit uptime-kuma) \
|
|
|
|
|
--cap-drop ALL --cap-add CHOWN --cap-add FOWNER --cap-add SETUID --cap-add SETGID \
|
|
|
|
|
--security-opt no-new-privileges:true \
|
|
|
|
|
-p 3001:3001 -v /var/lib/archipelago/uptime-kuma:/app/data \
|
|
|
|
|
@@ -531,7 +564,9 @@ fi
|
|
|
|
|
if ! $DOCKER ps --format '{{.Names}}' 2>/dev/null | grep -q jellyfin; then
|
|
|
|
|
log "Creating Jellyfin..."
|
|
|
|
|
mkdir -p /var/lib/archipelago/jellyfin/config /var/lib/archipelago/jellyfin/cache
|
|
|
|
|
$DOCKER run -d --name jellyfin --restart unless-stopped --memory=$(mem_limit jellyfin) \
|
|
|
|
|
$DOCKER run -d --name jellyfin --restart unless-stopped \
|
|
|
|
|
--health-cmd="curl -sf http://localhost:8096/ || exit 1" --health-interval=30s --health-timeout=5s --health-retries=3 \
|
|
|
|
|
--memory=$(mem_limit jellyfin) \
|
|
|
|
|
--cap-drop ALL --security-opt no-new-privileges:true \
|
|
|
|
|
-p 8096:8096 \
|
|
|
|
|
-v /var/lib/archipelago/jellyfin/config:/config \
|
|
|
|
|
@@ -541,7 +576,9 @@ fi
|
|
|
|
|
if ! $DOCKER ps --format '{{.Names}}' 2>/dev/null | grep -q photoprism; then
|
|
|
|
|
log "Creating PhotoPrism..."
|
|
|
|
|
mkdir -p /var/lib/archipelago/photoprism
|
|
|
|
|
$DOCKER run -d --name photoprism --restart unless-stopped --memory=$(mem_limit photoprism) \
|
|
|
|
|
$DOCKER run -d --name photoprism --restart unless-stopped \
|
|
|
|
|
--health-cmd="curl -sf http://localhost:2342/ || exit 1" --health-interval=30s --health-timeout=5s --health-retries=3 \
|
|
|
|
|
--memory=$(mem_limit photoprism) \
|
|
|
|
|
--cap-drop ALL --cap-add CHOWN --cap-add SETUID --cap-add SETGID \
|
|
|
|
|
--security-opt no-new-privileges:true \
|
|
|
|
|
-p 2342:2342 -v /var/lib/archipelago/photoprism:/photoprism/storage \
|
|
|
|
|
@@ -551,7 +588,9 @@ fi
|
|
|
|
|
if ! $DOCKER ps --format '{{.Names}}' 2>/dev/null | grep -q ollama; then
|
|
|
|
|
log "Creating Ollama..."
|
|
|
|
|
mkdir -p /var/lib/archipelago/ollama
|
|
|
|
|
$DOCKER run -d --name ollama --restart unless-stopped --memory=$(mem_limit ollama) \
|
|
|
|
|
$DOCKER run -d --name ollama --restart unless-stopped \
|
|
|
|
|
--health-cmd="curl -sf http://localhost:11434/ || exit 1" --health-interval=30s --health-timeout=5s --health-retries=3 \
|
|
|
|
|
--memory=$(mem_limit ollama) \
|
|
|
|
|
--cap-drop ALL --security-opt no-new-privileges:true \
|
|
|
|
|
--read-only --tmpfs /tmp:rw,noexec,nosuid,size=256m --tmpfs /run:rw,noexec,nosuid,size=64m \
|
|
|
|
|
-p 11434:11434 -v /var/lib/archipelago/ollama:/root/.ollama \
|
|
|
|
|
@@ -560,7 +599,9 @@ fi
|
|
|
|
|
if ! $DOCKER ps --format '{{.Names}}' 2>/dev/null | grep -q vaultwarden; then
|
|
|
|
|
log "Creating Vaultwarden..."
|
|
|
|
|
mkdir -p /var/lib/archipelago/vaultwarden
|
|
|
|
|
$DOCKER run -d --name vaultwarden --restart unless-stopped --memory=$(mem_limit vaultwarden) \
|
|
|
|
|
$DOCKER run -d --name vaultwarden --restart unless-stopped \
|
|
|
|
|
--health-cmd="curl -sf http://localhost:80/ || exit 1" --health-interval=30s --health-timeout=5s --health-retries=3 \
|
|
|
|
|
--memory=$(mem_limit vaultwarden) \
|
|
|
|
|
--cap-drop ALL --cap-add CHOWN --cap-add SETUID --cap-add SETGID --cap-add NET_BIND_SERVICE \
|
|
|
|
|
--security-opt no-new-privileges:true \
|
|
|
|
|
-p 8082:80 -v /var/lib/archipelago/vaultwarden:/data \
|
|
|
|
|
@@ -569,7 +610,9 @@ fi
|
|
|
|
|
if ! $DOCKER ps --format '{{.Names}}' 2>/dev/null | grep -q nextcloud; then
|
|
|
|
|
log "Creating Nextcloud..."
|
|
|
|
|
mkdir -p /var/lib/archipelago/nextcloud
|
|
|
|
|
$DOCKER run -d --name nextcloud --restart unless-stopped --memory=$(mem_limit nextcloud) \
|
|
|
|
|
$DOCKER run -d --name nextcloud --restart unless-stopped \
|
|
|
|
|
--health-cmd="curl -sf http://localhost:80/ || exit 1" --health-interval=30s --health-timeout=5s --health-retries=3 \
|
|
|
|
|
--memory=$(mem_limit nextcloud) \
|
|
|
|
|
--cap-drop ALL --cap-add CHOWN --cap-add SETUID --cap-add SETGID --cap-add DAC_OVERRIDE \
|
|
|
|
|
--security-opt no-new-privileges:true \
|
|
|
|
|
-p 8085:80 -v /var/lib/archipelago/nextcloud:/var/www/html \
|
|
|
|
|
@@ -577,7 +620,9 @@ if ! $DOCKER ps --format '{{.Names}}' 2>/dev/null | grep -q nextcloud; then
|
|
|
|
|
fi
|
|
|
|
|
if ! $DOCKER ps --format '{{.Names}}' 2>/dev/null | grep -q searxng; then
|
|
|
|
|
log "Creating SearXNG..."
|
|
|
|
|
$DOCKER run -d --name searxng --restart unless-stopped --memory=$(mem_limit searxng) \
|
|
|
|
|
$DOCKER run -d --name searxng --restart unless-stopped \
|
|
|
|
|
--health-cmd="curl -sf http://localhost:8080/ || exit 1" --health-interval=30s --health-timeout=5s --health-retries=3 \
|
|
|
|
|
--memory=$(mem_limit searxng) \
|
|
|
|
|
--cap-drop ALL --security-opt no-new-privileges:true \
|
|
|
|
|
--read-only --tmpfs /tmp:rw,noexec,nosuid,size=256m --tmpfs /run:rw,noexec,nosuid,size=64m \
|
|
|
|
|
-p 8888:8080 \
|
|
|
|
|
@@ -585,7 +630,9 @@ if ! $DOCKER ps --format '{{.Names}}' 2>/dev/null | grep -q searxng; then
|
|
|
|
|
fi
|
|
|
|
|
if ! $DOCKER ps --format '{{.Names}}' 2>/dev/null | grep -q onlyoffice; then
|
|
|
|
|
log "Creating OnlyOffice..."
|
|
|
|
|
$DOCKER run -d --name onlyoffice --restart unless-stopped --memory=$(mem_limit onlyoffice) \
|
|
|
|
|
$DOCKER run -d --name onlyoffice --restart unless-stopped \
|
|
|
|
|
--health-cmd="curl -sf http://localhost:80/ || exit 1" --health-interval=30s --health-timeout=5s --health-retries=3 \
|
|
|
|
|
--memory=$(mem_limit onlyoffice) \
|
|
|
|
|
--cap-drop ALL --cap-add CHOWN --cap-add SETUID --cap-add SETGID --cap-add DAC_OVERRIDE \
|
|
|
|
|
--security-opt no-new-privileges:true \
|
|
|
|
|
-p 9980:80 \
|
|
|
|
|
@@ -594,14 +641,18 @@ fi
|
|
|
|
|
if ! $DOCKER ps --format '{{.Names}}' 2>/dev/null | grep -q filebrowser; then
|
|
|
|
|
log "Creating File Browser..."
|
|
|
|
|
mkdir -p /var/lib/archipelago/filebrowser /var/lib/archipelago/filebrowser-db
|
|
|
|
|
$DOCKER run -d --name filebrowser --restart unless-stopped --memory=$(mem_limit filebrowser) \
|
|
|
|
|
$DOCKER run -d --name filebrowser --restart unless-stopped \
|
|
|
|
|
--health-cmd="curl -sf http://localhost:80/ || exit 1" --health-interval=30s --health-timeout=5s --health-retries=3 \
|
|
|
|
|
--memory=$(mem_limit filebrowser) \
|
|
|
|
|
-p 8083:80 -v /var/lib/archipelago/filebrowser:/srv \
|
|
|
|
|
docker.io/filebrowser/filebrowser:v2.27.0 2>>"$LOG" || true
|
|
|
|
|
fi
|
|
|
|
|
if ! $DOCKER ps --format '{{.Names}}' 2>/dev/null | grep -q nginx-proxy-manager; then
|
|
|
|
|
log "Creating Nginx Proxy Manager..."
|
|
|
|
|
mkdir -p /var/lib/archipelago/nginx-proxy-manager/data /var/lib/archipelago/nginx-proxy-manager/letsencrypt
|
|
|
|
|
$DOCKER run -d --name nginx-proxy-manager --restart unless-stopped --memory=$(mem_limit nginx-proxy-manager) \
|
|
|
|
|
$DOCKER run -d --name nginx-proxy-manager --restart unless-stopped \
|
|
|
|
|
--health-cmd="curl -sf http://localhost:81/ || exit 1" --health-interval=30s --health-timeout=5s --health-retries=3 \
|
|
|
|
|
--memory=$(mem_limit nginx-proxy-manager) \
|
|
|
|
|
--cap-drop ALL --cap-add CHOWN --cap-add SETUID --cap-add SETGID --cap-add NET_BIND_SERVICE \
|
|
|
|
|
--security-opt no-new-privileges:true \
|
|
|
|
|
-p 81:81 -p 8084:80 -p 8443:443 \
|
|
|
|
|
@@ -612,7 +663,9 @@ fi
|
|
|
|
|
if ! $DOCKER ps --format '{{.Names}}' 2>/dev/null | grep -q portainer; then
|
|
|
|
|
log "Creating Portainer..."
|
|
|
|
|
mkdir -p /var/lib/archipelago/portainer
|
|
|
|
|
$DOCKER run -d --name portainer --restart unless-stopped --memory=$(mem_limit portainer) \
|
|
|
|
|
$DOCKER run -d --name portainer --restart unless-stopped \
|
|
|
|
|
--health-cmd="curl -sf http://localhost:9000/ || exit 1" --health-interval=30s --health-timeout=5s --health-retries=3 \
|
|
|
|
|
--memory=$(mem_limit portainer) \
|
|
|
|
|
--cap-drop ALL --cap-add CHOWN --cap-add SETUID --cap-add SETGID --cap-add DAC_OVERRIDE \
|
|
|
|
|
--security-opt no-new-privileges:true \
|
|
|
|
|
-p 9000:9000 \
|
|
|
|
|
@@ -624,7 +677,9 @@ if ! $DOCKER ps --format '{{.Names}}' 2>/dev/null | grep -q tailscale; then
|
|
|
|
|
log "Creating Tailscale..."
|
|
|
|
|
mkdir -p /var/lib/archipelago/tailscale
|
|
|
|
|
# Tailscale needs NET_ADMIN + NET_RAW + TUN device (no --privileged)
|
|
|
|
|
$DOCKER run -d --name tailscale --restart unless-stopped --memory=$(mem_limit tailscale) \
|
|
|
|
|
$DOCKER run -d --name tailscale --restart unless-stopped \
|
|
|
|
|
--health-cmd="tailscale status || exit 1" --health-interval=30s --health-timeout=5s --health-retries=3 \
|
|
|
|
|
--memory=$(mem_limit tailscale) \
|
|
|
|
|
--network host \
|
|
|
|
|
--cap-drop=ALL \
|
|
|
|
|
--cap-add=NET_ADMIN \
|
|
|
|
|
@@ -651,7 +706,9 @@ if ! $DOCKER ps --format '{{.Names}}' 2>/dev/null | grep -q immich_server; then
|
|
|
|
|
mkdir -p /var/lib/archipelago/immich /var/lib/archipelago/immich-db
|
|
|
|
|
$DOCKER network create immich-net 2>/dev/null || true
|
|
|
|
|
if ! $DOCKER ps -a --format '{{.Names}}' 2>/dev/null | grep -q immich_postgres; then
|
|
|
|
|
$DOCKER run -d --name immich_postgres --restart unless-stopped --memory=$(mem_limit immich_postgres) --network immich-net \
|
|
|
|
|
$DOCKER run -d --name immich_postgres --restart unless-stopped \
|
|
|
|
|
--health-cmd="pg_isready -U postgres || exit 1" --health-interval=30s --health-timeout=5s --health-retries=3 \
|
|
|
|
|
--memory=$(mem_limit immich_postgres) --network immich-net \
|
|
|
|
|
-v /var/lib/archipelago/immich-db:/var/lib/postgresql/data \
|
|
|
|
|
-e POSTGRES_PASSWORD=$IMMICH_DB_PASS -e POSTGRES_USER=postgres -e POSTGRES_DB=immich \
|
|
|
|
|
ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0 2>>"$LOG" || true
|
|
|
|
|
@@ -662,12 +719,16 @@ if ! $DOCKER ps --format '{{.Names}}' 2>/dev/null | grep -q immich_server; then
|
|
|
|
|
done
|
|
|
|
|
fi
|
|
|
|
|
if ! $DOCKER ps --format '{{.Names}}' 2>/dev/null | grep -q immich_redis; then
|
|
|
|
|
$DOCKER run -d --name immich_redis --restart unless-stopped --memory=$(mem_limit immich_redis) --network immich-net \
|
|
|
|
|
$DOCKER run -d --name immich_redis --restart unless-stopped \
|
|
|
|
|
--health-cmd="redis-cli ping || exit 1" --health-interval=30s --health-timeout=5s --health-retries=3 \
|
|
|
|
|
--memory=$(mem_limit immich_redis) --network immich-net \
|
|
|
|
|
docker.io/valkey/valkey:7-alpine 2>>"$LOG" || true
|
|
|
|
|
sleep 2
|
|
|
|
|
fi
|
|
|
|
|
if ! $DOCKER ps --format '{{.Names}}' 2>/dev/null | grep -q immich_server; then
|
|
|
|
|
$DOCKER run -d --name immich_server --restart unless-stopped --memory=$(mem_limit immich_server) --network immich-net \
|
|
|
|
|
$DOCKER run -d --name immich_server --restart unless-stopped \
|
|
|
|
|
--health-cmd="curl -sf http://localhost:2283/ || exit 1" --health-interval=30s --health-timeout=5s --health-retries=3 \
|
|
|
|
|
--memory=$(mem_limit immich_server) --network immich-net \
|
|
|
|
|
-p 2283:2283 -v /var/lib/archipelago/immich:/usr/src/app/upload \
|
|
|
|
|
-e DB_HOSTNAME=immich_postgres -e DB_USERNAME=postgres -e DB_PASSWORD=$IMMICH_DB_PASS \
|
|
|
|
|
-e DB_DATABASE_NAME=immich -e REDIS_HOSTNAME=immich_redis \
|
|
|
|
|
@@ -682,20 +743,26 @@ if ! $DOCKER ps --format '{{.Names}}' 2>/dev/null | grep -q penpot-frontend; the
|
|
|
|
|
mkdir -p /var/lib/archipelago/penpot-assets /var/lib/archipelago/penpot-postgres
|
|
|
|
|
$DOCKER network create penpot-net 2>/dev/null || true
|
|
|
|
|
if ! $DOCKER ps -a --format '{{.Names}}' 2>/dev/null | grep -q penpot-postgres; then
|
|
|
|
|
$DOCKER run -d --name penpot-postgres --restart unless-stopped --memory=$(mem_limit penpot-postgres) --network penpot-net \
|
|
|
|
|
$DOCKER run -d --name penpot-postgres --restart unless-stopped \
|
|
|
|
|
--health-cmd="pg_isready -U penpot || exit 1" --health-interval=30s --health-timeout=5s --health-retries=3 \
|
|
|
|
|
--memory=$(mem_limit penpot-postgres) --network penpot-net \
|
|
|
|
|
-v /var/lib/archipelago/penpot-postgres:/var/lib/postgresql/data \
|
|
|
|
|
-e POSTGRES_DB=penpot -e POSTGRES_USER=penpot -e POSTGRES_PASSWORD=$PENPOT_DB_PASS \
|
|
|
|
|
docker.io/postgres:15 2>>"$LOG" || true
|
|
|
|
|
sleep 5
|
|
|
|
|
fi
|
|
|
|
|
if ! $DOCKER ps --format '{{.Names}}' 2>/dev/null | grep -q penpot-valkey; then
|
|
|
|
|
$DOCKER run -d --name penpot-valkey --restart unless-stopped --memory=$(mem_limit penpot-valkey) --network penpot-net \
|
|
|
|
|
$DOCKER run -d --name penpot-valkey --restart unless-stopped \
|
|
|
|
|
--health-cmd="redis-cli ping || exit 1" --health-interval=30s --health-timeout=5s --health-retries=3 \
|
|
|
|
|
--memory=$(mem_limit penpot-valkey) --network penpot-net \
|
|
|
|
|
-e VALKEY_EXTRA_FLAGS="--maxmemory 128mb --maxmemory-policy volatile-lfu" \
|
|
|
|
|
docker.io/valkey/valkey:8.1 2>>"$LOG" || true
|
|
|
|
|
sleep 3
|
|
|
|
|
fi
|
|
|
|
|
if ! $DOCKER ps --format '{{.Names}}' 2>/dev/null | grep -q penpot-backend; then
|
|
|
|
|
$DOCKER run -d --name penpot-backend --restart unless-stopped --memory=$(mem_limit penpot-backend) --network penpot-net \
|
|
|
|
|
$DOCKER run -d --name penpot-backend --restart unless-stopped \
|
|
|
|
|
--health-cmd="curl -sf http://localhost:6060/ || exit 1" --health-interval=30s --health-timeout=5s --health-retries=3 \
|
|
|
|
|
--memory=$(mem_limit penpot-backend) --network penpot-net \
|
|
|
|
|
-v /var/lib/archipelago/penpot-assets:/opt/data/assets \
|
|
|
|
|
-e PENPOT_PUBLIC_URI="http://${TARGET_IP}:9001" \
|
|
|
|
|
-e PENPOT_SECRET_KEY=archipelago-penpot-secret-key-change-in-production \
|
|
|
|
|
@@ -709,7 +776,9 @@ if ! $DOCKER ps --format '{{.Names}}' 2>/dev/null | grep -q penpot-frontend; the
|
|
|
|
|
sleep 5
|
|
|
|
|
fi
|
|
|
|
|
if ! $DOCKER ps --format '{{.Names}}' 2>/dev/null | grep -q penpot-exporter; then
|
|
|
|
|
$DOCKER run -d --name penpot-exporter --restart unless-stopped --memory=$(mem_limit penpot-exporter) --network penpot-net \
|
|
|
|
|
$DOCKER run -d --name penpot-exporter --restart unless-stopped \
|
|
|
|
|
--health-cmd="curl -sf http://localhost:6061/ || exit 1" --health-interval=30s --health-timeout=5s --health-retries=3 \
|
|
|
|
|
--memory=$(mem_limit penpot-exporter) --network penpot-net \
|
|
|
|
|
-e PENPOT_SECRET_KEY=archipelago-penpot-secret-key-change-in-production \
|
|
|
|
|
-e PENPOT_PUBLIC_URI=http://penpot-frontend:8080 \
|
|
|
|
|
-e PENPOT_REDIS_URI=redis://penpot-valkey/0 \
|
|
|
|
|
@@ -717,7 +786,9 @@ if ! $DOCKER ps --format '{{.Names}}' 2>/dev/null | grep -q penpot-frontend; the
|
|
|
|
|
sleep 2
|
|
|
|
|
fi
|
|
|
|
|
if ! $DOCKER ps --format '{{.Names}}' 2>/dev/null | grep -q penpot-frontend; then
|
|
|
|
|
$DOCKER run -d --name penpot-frontend --restart unless-stopped --memory=$(mem_limit penpot-frontend) --network penpot-net \
|
|
|
|
|
$DOCKER run -d --name penpot-frontend --restart unless-stopped \
|
|
|
|
|
--health-cmd="curl -sf http://localhost:80/ || exit 1" --health-interval=30s --health-timeout=5s --health-retries=3 \
|
|
|
|
|
--memory=$(mem_limit penpot-frontend) --network penpot-net \
|
|
|
|
|
-p 9001:8080 -v /var/lib/archipelago/penpot-assets:/opt/data/assets \
|
|
|
|
|
-e PENPOT_PUBLIC_URI="http://${TARGET_IP}:9001" \
|
|
|
|
|
-e PENPOT_FLAGS=disable-email-verification enable-smtp enable-prepl-server disable-secure-session-cookies \
|
|
|
|
|
@@ -731,7 +802,9 @@ if $DOCKER images --format '{{.Repository}}:{{.Tag}}' 2>/dev/null | grep -q 'nos
|
|
|
|
|
if ! $DOCKER ps --format '{{.Names}}' 2>/dev/null | grep -q nostr-rs-relay; then
|
|
|
|
|
log "Creating nostr-rs-relay..."
|
|
|
|
|
mkdir -p /var/lib/archipelago/nostr-rs-relay
|
|
|
|
|
$DOCKER run -d --name nostr-rs-relay --restart unless-stopped --memory=$(mem_limit nostr-rs-relay) \
|
|
|
|
|
$DOCKER run -d --name nostr-rs-relay --restart unless-stopped \
|
|
|
|
|
--health-cmd="curl -sf http://localhost:8080/ || exit 1" --health-interval=30s --health-timeout=5s --health-retries=3 \
|
|
|
|
|
--memory=$(mem_limit nostr-rs-relay) \
|
|
|
|
|
-p 7047:7047 -v /var/lib/archipelago/nostr-rs-relay:/data \
|
|
|
|
|
scsibug/nostr-rs-relay:latest 2>>"$LOG" || true
|
|
|
|
|
fi
|
|
|
|
|
@@ -740,7 +813,9 @@ if $DOCKER images --format '{{.Repository}}:{{.Tag}}' 2>/dev/null | grep -q 'str
|
|
|
|
|
if ! $DOCKER ps --format '{{.Names}}' 2>/dev/null | grep -q strfry; then
|
|
|
|
|
log "Creating strfry..."
|
|
|
|
|
mkdir -p /var/lib/archipelago/strfry
|
|
|
|
|
$DOCKER run -d --name strfry --restart unless-stopped --memory=$(mem_limit strfry) \
|
|
|
|
|
$DOCKER run -d --name strfry --restart unless-stopped \
|
|
|
|
|
--health-cmd="curl -sf http://localhost:7777/ || exit 1" --health-interval=30s --health-timeout=5s --health-retries=3 \
|
|
|
|
|
--memory=$(mem_limit strfry) \
|
|
|
|
|
-p 7777:7777 -v /var/lib/archipelago/strfry:/data \
|
|
|
|
|
hoytech/strfry:latest 2>>"$LOG" || true
|
|
|
|
|
fi
|
|
|
|
|
@@ -758,7 +833,9 @@ if ! $DOCKER ps --format '{{.Names}}' 2>/dev/null | grep -q indeedhub; then
|
|
|
|
|
fi
|
|
|
|
|
if [ -n "$INDEEDHUB_IMAGE" ]; then
|
|
|
|
|
log "Creating Indeehub from $INDEEDHUB_IMAGE..."
|
|
|
|
|
$DOCKER run -d --name indeedhub --restart unless-stopped --memory=$(mem_limit indeedhub) \
|
|
|
|
|
$DOCKER run -d --name indeedhub --restart unless-stopped \
|
|
|
|
|
--health-cmd="curl -sf http://localhost:80/ || exit 1" --health-interval=30s --health-timeout=5s --health-retries=3 \
|
|
|
|
|
--memory=$(mem_limit indeedhub) \
|
|
|
|
|
--cap-drop ALL --security-opt no-new-privileges:true \
|
|
|
|
|
--read-only --tmpfs /tmp:rw,noexec,nosuid,size=64m --tmpfs /app/.next/cache:rw,noexec,nosuid,size=128m \
|
|
|
|
|
-p 7777:7777 \
|
|
|
|
|
|