Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some preliminary support of passing docker run options to services #9

Draft
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
2 participants
@FabianEmmes
Copy link

commented Jun 3, 2019

In my usecase I need to pass parameters (specifically volumes) to docker run. This change adds a service option "volumes" to be set in the PREvant configuration. It could be extended to other docker run parameters. This PR is meant as a base for discussion of how to add this kind of feature to PREvant.

@schrieveslaach
Copy link
Contributor

left a comment

Thanks for this PR. At first glance LGTM.

Do you mind to document these new configuration values in api/README.md?

@@ -77,6 +78,8 @@ pub struct ServiceConfig {
container_type: ContainerType,
#[serde(skip)]
port: u16,
#[serde(skip)]
docker_volumes: Vec<String>,

This comment has been minimized.

Copy link
@schrieveslaach

schrieveslaach Jun 4, 2019

Contributor

In order to be consistent with the other fields I would prefer to use Option<Vec<String>> here.

@@ -169,6 +177,10 @@ impl ServiceConfig {
}
}

pub fn docker_volumes(&self) -> Vec<&str> {

This comment has been minimized.

Copy link
@schrieveslaach

schrieveslaach Jun 4, 2019

Contributor

This should be similar to config.env():

pub fn docker_volumes<'a, 'b: 'a>(&'b self) -> Option<&'a Vec<String>> {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.