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

Docker install #7

Merged
merged 9 commits into from
Sep 24, 2019
Merged

Docker install #7

merged 9 commits into from
Sep 24, 2019

Conversation

sharkoz
Copy link
Contributor

@sharkoz sharkoz commented Sep 3, 2019

Creates a docker image for easy deployment.
This is deployable to docker hub, as seen here :
https://cloud.docker.com/u/cosme/repository/docker/cosme/owntracks-ui

You should of course create your own repo from docker hub and edit the readme accordingly to give the proper image name.

@linusg linusg added Priority: High Do it soon Status: Accepted This seems to be a good idea and someone should start working on it Type: Feature New feature labels Sep 3, 2019
Copy link
Member

@linusg linusg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @sharkoz,

Thanks a lot for this PR! 😃

I'm confident it will just work, in fact I'm already using Docker with this project - but in a much more hackish way, and without a custom Dockerfile.

I made a few suggestions, most importantly renaming the (misleading) SERVER_URL environment variable to SERVER_HOST, as well as some formatting changes.

The nginx config might need some updates when I finally release v2 (it's a single page application), but let's not worry about that. I'll look into releasing on Dockerhub (never did that before), My preferred solution would be moving this project over to the @owntracks organisation and use their Docker Hub namespace for the package. 🤔
I'll create a separate discussion issue for this.

nginx.tmpl Outdated Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
@sharkoz
Copy link
Contributor Author

sharkoz commented Sep 3, 2019

All done :)

For starters, publishing yourself on docker hub is very easy, you create an account, link it to your github account, and then you create a new repository on docker hub, link it to this one on github, and configure it to 'autobuild'. Now every commit to master will build automatically a new image on docker hub !

@linusg linusg added Status: In progress Someone's currently working on this and removed Status: Accepted This seems to be a good idea and someone should start working on it labels Sep 3, 2019
Dockerfile Outdated Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved
Copy link
Member

@linusg linusg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two more small changes please and I think we can merge this!

nginx.tmpl Outdated Show resolved Hide resolved
nginx.tmpl Outdated Show resolved Hide resolved
sharkoz and others added 2 commits September 3, 2019 21:37
Co-Authored-By: Linus Groh <[email protected]>
Co-Authored-By: Linus Groh <[email protected]>
@sharkoz
Copy link
Contributor Author

sharkoz commented Sep 14, 2019

Is everything OK now ? 😉

@linusg
Copy link
Member

linusg commented Sep 14, 2019

Is everything OK now ? 😉

Almost - please see #7 (comment)

@glynhudson
Copy link

Nice work, this will be a very useful addition 👍

@sharkoz sharkoz requested a review from linusg September 17, 2019 16:35
@linusg
Copy link
Member

linusg commented Sep 17, 2019

@jpmens can we set up builds for owntracks/frontend on Dockerhub?

@jpmens
Copy link
Member

jpmens commented Sep 17, 2019

@linusg we can, whereby “we” means somebody tells me what buttons to press and I press the buttons. :)

I’ve done it once before but have forgotten how it works. If @sharkoz, say, guides me (a micro howto would be wonderful), I’ll gladly attend to it, but it might take until Monday until I do so as I’m off to EuroBSDCon tomorrow morning.

@sharkoz
Copy link
Contributor Author

sharkoz commented Sep 17, 2019

@linusg we can, whereby “we” means somebody tells me what buttons to press and I press the buttons. :)

I’ve done it once before but have forgotten how it works. If @sharkoz, say, guides me (a micro howto would be wonderful), I’ll gladly attend to it, but it might take until Monday until I do so as I’m off to EuroBSDCon tomorrow morning.

@jpmens , once this is merged, you have to go on docker hub, login using the owntracks account (https://hub.docker.com/u/owntracks) , and then go into the menu 'repositories'.
Then you click 'create repository', you name it, and then hopefully if you linked your docker account to your github account, you can then click on the github logo, select your org and this repo, and then, press 'create and build'.
It should automatically clone the repo and build the image, under the tag 'latest'.
You can then add a tag manually to reference this version, even more considering that @linusg is planning for a v2. To make this easier, you can, before clicking 'create and build' :

  • click on 'Click here to customize the build settings'
  • add a build rule (using the +)
  • Type: tag
  • Source : /^.+/
  • Docker Tag = {sourceref}

This way @linusg can create a tag on github and it will automatically create a tagged image with the same name.

Afterwards, you can edit the README to use the name of the image you created instead of the name of my image (cosme/owntracks-ui)

@jpmens
Copy link
Member

jpmens commented Sep 24, 2019

@sharkoz thank you for what I thought were very clear instructions, but I appear to be doing something incorrectly, as when clicking on the Github logo, I don't get anything other than "Customize build settings".

jmbp-5553

Can you see where I've gone wrong from the screenshot?

@sharkoz
Copy link
Contributor Author

sharkoz commented Sep 24, 2019 via email

@jpmens
Copy link
Member

jpmens commented Sep 24, 2019

(attachments sent in via email aren't shown in Github issues :-)

@jpmens
Copy link
Member

jpmens commented Sep 24, 2019

Got it, thank you. I had to re-link Github, and I'm now completing your instructions.

@jpmens
Copy link
Member

jpmens commented Sep 24, 2019

jmbp-5557

@linusg, over to you, I think. :-)

@linusg linusg merged commit f467eb4 into owntracks:master Sep 24, 2019
@linusg linusg added Status: Done Feature has been implemented, bug fixed, question answered etc. and removed Status: In progress Someone's currently working on this labels Sep 24, 2019
@linusg
Copy link
Member

linusg commented Sep 24, 2019

Awesome, let's see if this works. Thanks again for the PR @sharkoz!

@jpmens
Copy link
Member

jpmens commented Sep 24, 2019

I don't see Dockerhub building this ... Is it due to a missing tag? I did as @sharkoz suggested:

This way @linusg can create a tag on github and it will automatically create a tagged image with the same name.

@jpmens
Copy link
Member

jpmens commented Sep 24, 2019

Yay!
jmbp-5558

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: High Do it soon Status: Done Feature has been implemented, bug fixed, question answered etc. Type: Feature New feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants