Add support for FoundryVTT CLI
Feature description
Include the FoundryVTT CLI in the image. Document the usage of the command from the host system.
See:
- https://github.com/foundryvtt/foundryvtt-cli
Motivation
- This would support the development community that uses the container.
- Removes the need to developers to modify the container.
- Makes the container more useful in a development workflow.
Example
TBD
Pitch
It improves the usefulness of the container without causing bloat or complication to existing use cases.
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
this really should be 3 things to get fvtt cli working in container
- npm install -g @foundryvtt/foundryvtt-cli
- fvtt configure set installPath /the/installPath
- fvtt configure set dataPath /the/dataPath
Agreed that this should be relatively straightforward to implement.
I have a concern about how the tool stores its configuration in the root user's home directory. This could be problematic for people that are not running the container as root.
https://github.com/foundryvtt/foundryvtt-cli/blob/8c975536fb9e748274f6910790f43581d9740071/config.mjs#L33-L41
# cat ~root/.local/share/.fvttrc.yml
installPath: /home/foundry/resources/app
dataPath: /data
There is a feature request open that, if implemented, will add some needed flexibility to the configuration location:
- https://github.com/foundryvtt/foundryvtt-cli/issues/40
Hm, I didn't notice that, but I see it now on my system as well.
Looking at that code it seems like there are 2 options set XDG_DATA_HOME env variable to where you want the config to go
or execute fvtt as the same userid you are using for the container (which drops the file as /home/foundry/.fvttrc.yml)
/home/foundry $ ls -alh
total 172K
drwxr-sr-x 1 foundry foundry 111 Oct 25 06:56 .
drwxr-xr-x 1 root root 33 Sep 29 10:07 ..
-rw-r--r-- 1 root foundry 3 Oct 25 06:48 .fvttrc.yml