Copy Rocket.toml to /usr/share/peach-web #55
Reference in New Issue
Block a user
No description provided.
Delete Branch "copy-rocket-toml"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Now that we are using the Rocket "secrets" feature (for storing secrets in private cookies), it is required that a secret key is configured in Rocket.toml.
During development, this key is autogenerated automatically by Rocket, but in "production" (on the pi) this key is not autogenerated, and without the key, peach-web throw an error on startup.
For now I've manually put a secret key into Rocket.toml and am copying this to the correct working directory as part of the debian package deployment,
but in the future, we should probably figure out a way to uniquely create this secret key for each PeachCloud. This could also be something that happens during the PeachCloud initialization. While it is being initialized, it could randomly generate a secret key, and then use sed to replace the place in Rocket.toml. I suggest doing this as a separate PR.
Sounds like a good approach to me.