Node-solid-server: Modifying new-account templates doesn't seem to work

Created on 7 Aug 2019  路  3Comments  路  Source: solid/node-solid-server

Steps to reproduce

Run a multi-user pod in a docker container, e.g. called 'solid'
Use docker cp to copy a file (e.g. test.txt) into solid:default-templates/new-account
Restart 'solid' with docker restart
Create a new account

Identified Issue

In my case test.txt never shows up in the new account even though I can see it in the default-templates dir.

What am I doing wrong/not seeing here?

Most helpful comment

For later cases, you might wanna use npm run clean to delete the necessary folders in /config.

All 3 comments

Am using NSS 5.1.6

I resolved it myself and for people that encounter a similar problem in the future I will explain what I think causes this and how to fix it:

If you first create and run the container, createApp() (from /lib/create-app.js) will check for the existence and copy in the case of non-existence, the dirs from /default-templates to /config (using initTemplateDirs()).

If you then, after running the app for the first time, modify the default-templates and restart the container, the default-templates dir will not be copied again since the template dirs already exist within /config.

I could identify 2 ways of updating the default-templates in an already running/working docker container:

  • Using docker cp to move the new templates into default-templates and using docker exec solid rm <path-to-config-dir> to remove the old config directory and therefore 'trigger' a re-creation of the config dir based on the new templates
  • Inserting new templates directly into the config dir using docker cp

For later cases, you might wanna use npm run clean to delete the necessary folders in /config.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pheyvaer picture pheyvaer  路  7Comments

jaxoncreed picture jaxoncreed  路  5Comments

RubenVerborgh picture RubenVerborgh  路  4Comments

justinwb picture justinwb  路  6Comments

SvenDowideit picture SvenDowideit  路  6Comments