foundryvtt-docker icon indicating copy to clipboard operation
foundryvtt-docker copied to clipboard

Add support for FoundryVTT CLI

Open felddy opened this issue 3 years ago • 4 comments

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

felddy avatar Apr 10 '23 15:04 felddy

this really should be 3 things to get fvtt cli working in container

  1. npm install -g @foundryvtt/foundryvtt-cli
  2. fvtt configure set installPath /the/installPath
  3. fvtt configure set dataPath /the/dataPath

orangepeelbeef avatar Oct 22 '23 00:10 orangepeelbeef

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

felddy avatar Oct 23 '23 14:10 felddy

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

orangepeelbeef avatar Oct 25 '23 07:10 orangepeelbeef