Localstorage & /app/data
-
@timconsidine said in Localstorage & /app/data:
@robi I don't think I am (now).
so what is this in Dockerfile?
&& ln -s /app/data/data /app/code/data \
&& ln -s /app/data/public /app/code/public
-
@timconsidine I updated my post, since it's about the
ln
commands not thecp
commands -
I would double check if the app was built and updated properly to use your latest Dockerfile. You can do
cloudron debug
and then you cancloudron exec
to inspect if all the symlinks are proper. You can then launch your start.sh manually in that shell also. -
Thank you
So app builds and launches, symlinks created in Dockerfile work
But there is weirdness in runningstart.sh
Some commands executed, some not.
Eg the firstmkdir
works but not #2 or #3
The firstcp
fromtmp
works but not #2 or #3
Thechown
doesn't work but the script is running to the end and working because the app launches.
Any ideas ?
Here's thestart.sh
:#!/bin/bash # set -eu mkdir -p /app/data/config || true mkdir -p /app/data/public || true mkdir -p /app/data/images || true cp -r /tmp/skeleton/* /app/data/config cp -r /tmp/public/* /app/data/public cp -r /tmp/images/* /app/data/images chown -R cloudron:cloudron /app/data export npm_config_cache=/app/data/.npm-cache exec /usr/local/bin/gosu cloudron:cloudron npm start
Cloudronmanifest.json has localstorage addon and proxyAuth addon.
-
@timconsidine not sure if this the main problem, but
mkdir -p ...
does "no error if existing, make parent directories as needed" so should run it without the|| true
also if essential commands don't work instart.sh
the app should not just continue anways in some unknown state. -
@nebulon thank you
I stuck in the|| true
because chatGPT told me to do so when I asked it why the script wasn't working !Yep, it's weird behaviour, some lines working but some not.
I can execute the failed lines manually in Terminal, but not the right way to do it ! -
@timconsidine said in Localstorage & /app/data:
I stuck in the || true because chatGPT told me to do so when I asked it why the script wasn't working !
lol - That will just always make an exec return
true
/ successful even when it fails.AI will replace developers right.
-
@BrutalBirdie said in Localstorage & /app/data:
AI will replace developers right.
Absolutely ... not !
I have seen some absolute shockers (hallucinations, wrong responses) but nevertheless I do find it useful.
Comes back to that old age truth : you can have the best sword/drill/hammer in the world, but it's only useful if you know how to use it.
AI is helpful ... except when it's not and you recognise it is not !