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

Using Docker and docker-compose #25

Open
th0mas opened this issue Sep 1, 2020 · 1 comment
Open

Using Docker and docker-compose #25

th0mas opened this issue Sep 1, 2020 · 1 comment
Labels

Comments

@th0mas
Copy link
Contributor

th0mas commented Sep 1, 2020

While working on #11, #23 & #24 i've noticed that there are a lot of edge cases for our deployment script. We rely on people running a recent version of macOS and having a reasonably standard setup. I've had to switch back to zsh to develop the script as my usual shell is fish - which isn't POSIX compliant.

Using docker would allow us to rely on a fixed environment across development and possibly production - for example the hub server could run in a cluster with other apps needed for home.

Docker would solve our dependency problems as once one container works, we can almost guarantee anyone else who uses the same docker-compose.yml would be able to run exactly the same setup as us, which can help debugging.

Formalising the configuration and networking requirements into a Dockerfile wouldn't do any harm either, and this would help us iron out any bugs across our networking stack, especially with using websockets over SSL.

Using docker-compose we would be able to maintain a cross-platform "single-command" development tool, and rely on the hard work of others in the form of the Elixir container to keep our environment up to date.

Downsides are of course adding an extra dependency to our stack:

As for using Docker, unless we are deploying using docker (and don't have any other choice),
I would prefer to avoid it because it's another thing to have to maintain/update.

-- Mentioned in #11

and it's yet more work on the development process for smart home.

Docker for mac is also HUGE so if people aren't already using it as part of other stacks, it is a large expectation for them to download and install it

@th0mas th0mas added the discuss label Sep 1, 2020
@nelsonic
Copy link
Member

nelsonic commented Sep 4, 2020

@th0mas Yeah, the Python script you've been working on is almost there.
Our objective is to have it running on a very narrow set of hardware/OS.
This project is Open Source because that's our ethos, but we really don't expect anyone else to run/use it ... 💭
(at least not in the short term...)

As you point out, the Elixir Dockerfile appears to be "officially" supported: https://hub.docker.com/_/elixir
image

As is the Postgres image which @SimonLab has been using: https://hub.docker.com/_/postgres
image

So if you feel it will take you less than T4h to setup a Dockerfile for this project, go for it. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants