✨ add dnslink-cloudflare
This commit is contained in:
parent
6d035df93b
commit
79b257b11e
@ -8,6 +8,8 @@ RUN set -x \
|
|||||||
&& tar -xzf "$CLUSTER_TAR" --strip-components=1 ipfs-cluster-ctl/ipfs-cluster-ctl \
|
&& tar -xzf "$CLUSTER_TAR" --strip-components=1 ipfs-cluster-ctl/ipfs-cluster-ctl \
|
||||||
&& mv ipfs-cluster-ctl /usr/local/bin
|
&& mv ipfs-cluster-ctl /usr/local/bin
|
||||||
|
|
||||||
|
RUN npm install --global dnslink-cloudflare
|
||||||
|
|
||||||
ADD pin.sh /usr/local/bin/pin.sh
|
ADD pin.sh /usr/local/bin/pin.sh
|
||||||
|
|
||||||
ENTRYPOINT [ "/usr/local/bin/pin.sh" ]
|
ENTRYPOINT [ "/usr/local/bin/pin.sh" ]
|
12
pin.sh
12
pin.sh
@ -6,12 +6,20 @@ HOST=${PLUGIN_CLUSTER_HOST:-"/dns4/cluster.walkah.cloud"}
|
|||||||
root_cid=$(ipfs-cluster-ctl \
|
root_cid=$(ipfs-cluster-ctl \
|
||||||
--host "$HOST" \
|
--host "$HOST" \
|
||||||
--basic-auth "${PLUGIN_CLUSTER_USER}:${PLUGIN_CLUSTER_PASSWORD}" \
|
--basic-auth "${PLUGIN_CLUSTER_USER}:${PLUGIN_CLUSTER_PASSWORD}" \
|
||||||
|
$PLUGIN_CLUSTER_ARGS \
|
||||||
add \
|
add \
|
||||||
--quieter \
|
--quieter \
|
||||||
--cid-version 1 \
|
--cid-version 1 \
|
||||||
--name "${PLUGIN_PIN_NAME}" \
|
--name "${PLUGIN_DOMAIN}" \
|
||||||
--recursive \
|
--recursive \
|
||||||
|
--local \
|
||||||
$PLUGIN_EXTRA_ARGS \
|
$PLUGIN_EXTRA_ARGS \
|
||||||
"$PLUGIN_PATH" )
|
"$PLUGIN_PATH" )
|
||||||
|
|
||||||
echo "$root_cid"
|
if [ ! -x "$PLUGIN_CF_EMAIL" ]; then
|
||||||
|
export CF_API_EMAIL=$PLUGIN_CF_EMAIL
|
||||||
|
export CF_API_KEY=$PLUGIN_CF_APIKEY
|
||||||
|
dnslink-cloudflare -d $PLUGIN_DOMAIN -l "/ipfs/${root_cid}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Deployed: $root_cid"
|
Loading…
x
Reference in New Issue
Block a user