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

Merge Sonweb and SonWeb docker #92

Closed
RaymondMouthaan opened this issue May 5, 2018 · 12 comments
Closed

Merge Sonweb and SonWeb docker #92

RaymondMouthaan opened this issue May 5, 2018 · 12 comments
Assignees

Comments

@RaymondMouthaan
Copy link
Contributor

RaymondMouthaan commented May 5, 2018

@reloxx13 what do you think of merging my docker stuff into your Sonoff github project, so we have all code in one place?

Maybe before renaming of the project or after.. #81 ?

I also was thinking from a docker point of view to extend the number of supported architectures.

Let me know your thoughts about it... 🤔

@reloxx13
Copy link
Collaborator

Heya,

if i add this to the repo, everything will be downloaded by the auto updater or git clone :S

and i dont know anything about those dockers now :X

How do you thought about merging it?

@ascillato
Copy link
Collaborator

What about making an organization that we have access and we can put everything together there?

We can put there:

  • SonWEB
  • SonWEB-docker
  • Sonoff-Tasmota_Modified
  • Sonoff-Tasmota_KNX

And anything else you can think of about HomeAutomation.

@RaymondMouthaan I'm looking also to make your SonWEB-docker as an ADD-ON for HomeAssistant. Those are ADD-ON are all dockers. I have to look better how to do that, but my question is if you think that can be possible to do that?

@RaymondMouthaan
Copy link
Contributor Author

Ola @reloxx13,

When we merge, all files and dirs from SonWeb-Docker will be placed in SonWeb. And indeed when a git clone and/or auto-update will be executed then also the docker related files will be downloaded. This wouldn't be a problem since these files do not interfere with the application it self.

As we decide to merge both, this would mean that we need a Travis account and the SonWeb GitHub project is synced to it - Travis builds the docker image and pushes it to Docker Hub. When one commits changes to GitHub, then Travis gets triggered and builds the SonWeb docker images pushes it to Docker Hub (automatically). I can take the docker part for my responsibility as you can continue your work for SonWeb application. Best would be if you can give me access to GitHub SonWeb, so we both maintain SonWeb. If giving access is a problem then using the PR mechanism could be a solution. I do the changes via PR (no access is required) and you can merge those changes.

Another thing i like to suggest is to work with "releases" .. let me explain :-) .. GitHub has the ability to create releases and tag them (see example). My idea (and seen at many GitHub projects) is to create a release using Travis. So with the Travis build job, we git clone the project, we pack all SonWeb related files and dirs (only required files, excluding the docker related files) into a tar.gz file and push this as a release with a version into GitHub. This release tar.gz file can be used by the auto-update function in SonWeb application. Curl or wget the tar.gz and extract and update SonWeb.
Since the source files of SonWeb are available on the Travis build server, we can build our Docker images directly right after. We also can include some tests before releasing a newer version.

If you are interested to do as above, I am happy to participate the SonWeb project :-) .. let me know your thoughts ...

@ascillato, for me SonWeb and SonWeb docker are related and candidates to merge to have all SonWeb related stuff at one place. This is easier to maintain and more user friendly.
However I don't see the reason to merge Sonoff-Tasmota_Modified and Sonoff-Tasmota_KNX into it. These projects are not related to SonWeb and I would not recommend to put those into the same project.
I am not a HomeAssistant user, so I am not sure what you mean by ADD-ONS in relation to Docker?

@RaymondMouthaan RaymondMouthaan self-assigned this May 16, 2018
@RaymondMouthaan
Copy link
Contributor Author

RaymondMouthaan commented May 16, 2018

@reloxx13
Just to inform you about the status and things todo ...

  • created a fork of SonWeb

  • merged SonWeb-docker into the fork

  • synced travis with GitHub SonWeb fork

  • managed to create a tar.gz file from all SonWeb application files (excluding travis and docker related files and folders)

  • managed to push that tar.gz file as release asset to GitHub using a encrypted token

  • managed to push docker images to Docker Hub

  • modification to the auto-updater: instead of git clone, use the GitHub release url to download the tar.gz and extract it to /app/sonweb to update to the lastest version [@reloxx13]

  • PR the fork to SonWeb (@RaymondMouthaan)

  • generate new encrypted token to access your GitHub [@reloxx13]

  • sign in Travis.org [@reloxx13]

  • update README and Wiki

  • Maybe a nice opportunity to implement [SUGGESTION] Rename SonWEB to TasmotaWEB #81 [@reloxx13 & @RaymondMouthaan]

  • Release SonWEB XAMPP portable from Travis to GitHub [@RaymondMouthaan]

  • Create new Docker Hub repository sonweb/sonweb or reloxx13/sonweb or use existing raymondmm/sonweb ? [@reloxx13 &@RaymondMouthaan]

For your reference:

If you have some time, we can have a chat and I'll talk you though it :)

Cheers,
Ray

@RaymondMouthaan
Copy link
Contributor Author

RaymondMouthaan commented May 17, 2018

@reloxx13, today I spend time to also release the sonweb xampp portable package and let it push to GitHub release page by Travis. I continue/finish this probably tomorrow. When it works (and I am convinced it will), then also sonweb portable will contain the latest version after each build (without manual interference).

update: sonweb_${version}_xampp_portable.zip gets pushed to releases automatically - done

@ascillato
Copy link
Collaborator

ascillato commented May 21, 2018

Info:

SonWEB with docker was accepted to be an optional add-on for homeassistant 👍

This is because the great job @reloxx13 did with SonWEB and the great job @RaymondMouthaan has done with the SonWEB docker. Congratulations! 👍

hassio-addons/repository#65

@reloxx13
Copy link
Collaborator

reloxx13 commented May 22, 2018

Hey @RaymondMouthaan ,

im very thanksfull for your effort! 👍

But still, it´s overwhelming me because this is all new for me x)

Would be very nice to have a meeting or further instructions.

@ascillato thank you, too, for the addon 👍
i followed the issue a lil bit with the selfupdate.
i need to install an nginx test environment and test how to set an environment variable.
than you could add it to the nginx config in the docker and i can check if this is present and hide the selfupdate function.

@RaymondMouthaan
Copy link
Contributor Author

RaymondMouthaan commented May 22, 2018

@reloxx13, sonweb is going to be used more widely 🎉.

As soon as you got time, let's have a Skype session or anything you prefer and we can have a chat. 😇

Tomorrow I will look into the solution of @frenck to let sonweb on nginx instead of apache since this is just the better for running within a docker container.
Also a nice solution to the Self update would be nice 😇.

@frenck
Copy link
Collaborator

frenck commented May 22, 2018

The selfupdate could be solved even quicker. Simply check if the .git folder exists (e.g., is it a valid .git repository?) And secondly, is git installed?

In the Docker container of the add-on I do not have git installed, so that would be triggered. Secondly, to safe some space, one should delete the .git folder, since it makes no sense keeping it there (so that could be a trigger as well).

If both are present, well... the upgrade button will work...

@RaymondMouthaan
Copy link
Contributor Author

@frenck please check #105, a different solution to SelfUpdate feature.

@frenck
Copy link
Collaborator

frenck commented May 24, 2018

Thanks for updating me on this @RaymondMouthaan 👍

@RaymondMouthaan
Copy link
Contributor Author

Merging is done and a lot more ...

Ill close this one.

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

No branches or pull requests

4 participants