Containerize the appliaction#13
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files
|
60dc443 to
1639b7f
Compare
33f11c8 to
1d2b0cc
Compare
abace5f to
7499604
Compare
262d342 to
ff94107
Compare
fb179b9 to
ed2deff
Compare
|
As wrongly commented on the next pr. I think that we should set a default location only when running in docker to make the command needed to run the application from the docker hub smaller. |
src/main.rs
Outdated
| if let Err(err) = astarte_cfg_builder.try_from_env() { | ||
| warn!("failed to retrieve Astarte connection config from ENV: {err}"); | ||
|
|
||
| #[cfg(feature = "docker")] |
There was a problem hiding this comment.
Instead of using the feature you could use an .unwrap_or_default invoked only when the feature is docker.
There was a problem hiding this comment.
I agree, since astarte_config_path is an optional parameter you can use a default value if it is not provided and since the docker feature is only used here it can be removed.
There was a problem hiding this comment.
I've done some modification to the code to avoid retrieving the path from the CLI. Still, to provide flexibility (to change the comfig.toml path) i maintained the env variable ASTARTE_CONFIG_PATH, which is retrievable only if containers are not used. If it is not set, the default path /etc/stream-rust-test/ is used
Signed-off-by: Riccardo Gallo <riccardo.gallo@secomind.com>
In this commit: - Define scripts, env file and Dockerfile to build and run the container - Get astarte config from env vars - Add dependabot checks for docker - Update Readme with the information to build and run a docker container Signed-off-by: Riccardo Gallo <riccardo.gallo@secomind.com>
Gracefully shut down all the active tasks when SIGINT or SIGTERM signals are received. Signed-off-by: Riccardo Gallo <riccardo.gallo@secomind.com>
…fig.toml If the application is run using the container, the config.toml config file location is set to /etc/stream-rust-test/, otherwise it can be modified by using the ASTARTE_CONFIG_PATH env variable Signed-off-by: Riccardo Gallo <riccardo.gallo@secomind.com>
Signed-off-by: Riccardo Gallo <riccardo.gallo@secomind.com>
Signed-off-by: Riccardo Gallo <riccardo.gallo@secomind.com>
Signed-off-by: Riccardo Gallo <riccardo.gallo@secomind.com>
Signed-off-by: Riccardo Gallo <riccardo.gallo@secomind.com>
Signed-off-by: Riccardo Gallo <riccardo.gallo@secomind.com>
6e09b55 to
a221368
Compare
…ents Signed-off-by: Riccardo Gallo <riccardo.gallo@secomind.com>
Make it possible to build a Docker container of the application and set all the necessary config files and environment variables to connect it to a running Astarte instance.
Closes #2