npm
Inspired by Micah P. Dombrowski's Node.js Environment.
ceramicstudio/cli/idx-clirequires keytar from npm which requires libsecret.
apt updatesudo apt-get install libsecret-1-dev pass gnupg2 dbus default-dbus-session-bus dbus-x11 pass gnupg2 gnome-keyringFILENAME="node-v${NODEJS_VERSION}-linux-x64.tar.xz"FILEURL="https://nodejs.org/dist/v${NODEJS_VERSION}/${FILENAME}"curl -O https://nodejs.org/dist/v${NODEJS_VERSION}/SHASUMS256.txtwget --progress=dot:giga ${FILEURL}grep $FILENAME SHASUMS256.txt | sha256sum -c -cp $FILENAME /results/mkdir -p /opt/nodejscd /opt/nodejstar -Jxf node-v14.16.0-linux-x64.tar.xzln -s node-v${NODEJS_VERSION}-linux-x64/ default/opt/nodejs/default/bin/node --versionhttps://stackoverflow.com/questions/51811564/sh-1-node-permission-denied#53270214
npm config set user 0 &&npm config set unsafe-perm truenpm install -g @ceramicnetwork/cli @ceramicstudio/idx-cliStart a Server
ngrok
regionusconsole_uitruetunnels btf protohttp addr7007 subdomainbtfecho 'authtoken:' $ngrok | cat - ngrok.yml > /tmp/out && mv /tmp/out ngrok.ymlStart ngrok.
nohup /ngrok start --all --config="/ngrok.yml" &> /tmp/ngrok.log & sleep 1tail /tmp/ngrok.logCeramic
nohup ceramic daemon &> /tmp/ceramic.log & sleep 1tail /tmp/ceramic.log
dbus-launch --sh-syntaxdbus-launch✖ Cannot autolaunch D-Bus without X11 $DISPLAY
D-BUS is an IPC (inter-process communication) mechanism that helps applications communicate with each other. D-Bus (Desktop Bus)
So libsecret won't work without an X11 host.
Did you ever figure out the issue with DBus? It's starting to come up more often. It's also a problem when running idx in a container.
As far as I can tell, IDX isn't going to work in a container or a windows linux subsystem because of libsecret. Libsecret wants to launch X11 when idx bootstrap happens. Has anyone found a workaround?
paul: The CLI is meant for development environments to get started quickly, it's not designed with CI or similar environments in mind. If you need to push the IDX config docs to a Ceramic node, using https://developers.idx.xyz/reference/idx-tools/#publishidxconfig is likely a better option.
Huh. That's pretty cool! So I could spin up ceramic in a container. Then from a more traditional local environment, I could run idx and push the example config docs over to the instance. Am I understanding that correctly, @Paul 3⃣ ?
That would work, in concept.
Then I could play around in this configuration, which is really ideal right now.
Once the config is pushed, i could also run IDX commands within the container as well.
If I'm understanding it correctly.
paul: It really depends on your use case, as long as you can provide a Ceramic instance to IDX it doesn't matter if it's running from the demon, docker or a remote server.
idx bootstrapcat /tmp/ceramic.lognohup dbus-daemon --session --nopidfile --nofork --address=unix:path=/tmp/dbus &> /tmp/ceramic.log & sleep 1tail /tmp/ceramic.logexport DBUS_SESSION_BUS_ADDRESS=unix:path=/tmp/dbusexport $(dbus-launch)dbus-launchenv -u DISPLAY dbus-launch --sh-syntaxgnome-keyring-daemon --start --daemonize --components=secrets# service dbus starteval "$(dbus-launch --sh-syntax)"https://github.com/ceramicstudio/idx-cli/issues/1
https://github.com/jaraco/keyring/issues/477
https://blog.ceramic.network/how-to-build-a-simple-notes-app-with-idx/
dbus-run-session -- shecho 'somecredstorepass' | gnome-keyring-daemon --unlockIDX
idx index:get did:key:z6Mkw1Mpfejq2R76AsQo2qJoAVaF6HH5nLDoHrKrsW5Wdnei basicProfileidx --help