🎉 initial commit
This commit is contained in:
commit
6d035df93b
13
Dockerfile
Normal file
13
Dockerfile
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
FROM node:lts
|
||||||
|
|
||||||
|
ENV CLUSTER_VERSION v1.0.4
|
||||||
|
ENV CLUSTER_TAR ipfs-cluster-ctl_${CLUSTER_VERSION}_linux-amd64.tar.gz
|
||||||
|
|
||||||
|
RUN set -x \
|
||||||
|
&& wget "https://dist.ipfs.io/ipfs-cluster-ctl/$CLUSTER_VERSION/$CLUSTER_TAR" \
|
||||||
|
&& tar -xzf "$CLUSTER_TAR" --strip-components=1 ipfs-cluster-ctl/ipfs-cluster-ctl \
|
||||||
|
&& mv ipfs-cluster-ctl /usr/local/bin
|
||||||
|
|
||||||
|
ADD pin.sh /usr/local/bin/pin.sh
|
||||||
|
|
||||||
|
ENTRYPOINT [ "/usr/local/bin/pin.sh" ]
|
3
README.md
Normal file
3
README.md
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# Drone IPFS Cluster
|
||||||
|
|
||||||
|
Publishes files to ipfs-cluster.
|
17
pin.sh
Executable file
17
pin.sh
Executable file
@ -0,0 +1,17 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
HOST=${PLUGIN_CLUSTER_HOST:-"/dns4/cluster.walkah.cloud"}
|
||||||
|
|
||||||
|
# pin to cluster
|
||||||
|
root_cid=$(ipfs-cluster-ctl \
|
||||||
|
--host "$HOST" \
|
||||||
|
--basic-auth "${PLUGIN_CLUSTER_USER}:${PLUGIN_CLUSTER_PASSWORD}" \
|
||||||
|
add \
|
||||||
|
--quieter \
|
||||||
|
--cid-version 1 \
|
||||||
|
--name "${PLUGIN_PIN_NAME}" \
|
||||||
|
--recursive \
|
||||||
|
$PLUGIN_EXTRA_ARGS \
|
||||||
|
"$PLUGIN_PATH" )
|
||||||
|
|
||||||
|
echo "$root_cid"
|
Loading…
x
Reference in New Issue
Block a user