Closed
Conversation
Closed
Member
Author
|
I've created a new PR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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:
./bin/docker/build.sh && ./bin/docker/run.shSince 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.dbfile 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.tomlfile 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 thestoragedir in a new file or even the database.Other apps have these three different types of data:
.envfile generated when you deploy/install de environment or env variables. The.envfile 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.tomlto the Git repo.We do not need to do those changes in order to merge this PR. And I can also ever the new
storagefolder. I do not think that's a breaking change because theconfig.tomlfile 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).