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

Fix #1: Migrated to Alpine, implemented server_default cmd #4

Merged
merged 1 commit into from
Sep 20, 2020

Conversation

mrusme
Copy link
Contributor

@mrusme mrusme commented Sep 12, 2020

This PR contains two changes:

  • Migrated the build stage as well as the final container to Alpine
  • Implemented server_default as default CMD that is being executed through the entrypoint.sh by using the values defined in the ENV entries. Those values can be overridden using the --env argument of docker run. Also it allows for a nicer deployment on Kubernetes by using a ConfigMap resource for specifying those values.

This PR also fixes #1 by setting the default host to 0.0.0.0.

@mrusme mrusme changed the title Migrated to Alpine, implemented server_default cmd Fix #1: Migrated to Alpine, implemented server_default cmd Sep 12, 2020
@fanzeyi
Copy link
Owner

fanzeyi commented Sep 20, 2020

Thanks, -crt-static is a neat trick. I'll merge this but I'm going to make some changes on the environment variable. structopt itself supports reading directly from environment variable like this so we don't really need to use entrypoint.sh for that.

lares/src/cli.rs

Lines 395 to 400 in af1527b

#[structopt(
short = "d",
long = "database",
env = "LARES_DATABASE",
default_value = "lares.db"
)]

@fanzeyi fanzeyi merged commit 2a264e0 into fanzeyi:master Sep 20, 2020
@mrusme mrusme deleted the feature/docker_enhancements branch September 21, 2020 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Docker container closes connection
2 participants