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

Reduce docker image size and simplify docker-compose setup #292

Merged
merged 2 commits into from
Jun 6, 2020

Conversation

jasonxh
Copy link
Contributor

@jasonxh jasonxh commented Mar 8, 2020

This PR is geared towards docker usability. The previous PR (#276) has already taken us a long way, by introducing Traefik to automate TLS setup. This PR addresses a few more pain points around docker and docker-compose.

  • Reduce docker image size by roughly 50%, by not producing unnecessary intermediate layers.
  • Update docker image base to node:8-alpine.
  • Simplify docker-compose.yml by removing unnecessary configs.
  • Consolidate all must have customization in .env file. Get rid of config duplication for domain name.
  • Remove the implicit assumption on external docker networks.
  • Standardize on docker volumes for state persistence.
  • Move docker-compose setup back to deployment/docker-compose, to be consistent with the other two deployment modes.
  • Add package-lock.json for version locking.

NOTE
Users of the updated docker-compose.yml will have to build their own images for now, until the official image openhab/openhabcloud-app is refreshed, due to some underlying changes (i.e. run-app.sh).

Signed-off-by: Jason Xia <jasonxh@gmail.com>
Signed-off-by: Jason Xia <jasonxh@gmail.com>
@marziman
Copy link
Contributor

Thanks @jasonxh ,
I will test and review it.

@digitaldan
Copy link
Contributor

I tested this a little and all seems to work, thanks!

@digitaldan digitaldan merged commit 513c20d into openhab:master Jun 6, 2020
@jasonxh jasonxh deleted the optimize-docker branch April 11, 2021 20:37
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.

3 participants