Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I've added docker configuration. In order to run it with docker you need to execute:
Since I do not know Rust I have followed instructions from this article https://www.lpalmieri.com/posts/fast-rust-docker-builds/ by @LukeMathWalker
I have moved the SQLite data file (
data.db
) to a new directory (storage
) because I thought I could not mount two files in the same directory but it's possible so I can revert the change. If we want to keep thedata.db
file in the root dir we can run the docker container with:I would keep the storage folder even if we only have one file now. I think it is a good thing to make it more explicit.
Besides, I would keep in the
config.toml
file only the variables that are read-only. I mean, the variables you need to pass to the program only when you start it. For example, I would move the "Site Name" to thestorage
dir in a new file or even the database.Other apps have these three different types of data:
.env
file generated when you deploy/install de environment or env variables. The.env
file is usually the option for development environments.Configuration files can contain default values and can also get values from env vars if they are provided when the app starts.
What I would do:
config.toml
to the Git repo.We do not need to do those changes in order to merge this PR. And I can also ever the new
storage
folder. I do not think that's a breaking change because theconfig.toml
file already allows you to change the path. People using docker would use the new default location (it can be changed anyway but you have to create your own docker "run" command).