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

[Question] How to deploy from local Ubuntu desktop machine to Digital Ocean machine? #51

Closed
beamsies opened this issue Aug 22, 2019 · 7 comments

Comments

@beamsies
Copy link

Hello,

First, thanks for providing such an excellent stack.

I'm a little new to Docker and I'm struggling to find the easiest way to deploy from my local Linux machine to my Digital Ocean (DO) droplet.

Here's how I understand the process outlined in the project folder "README.md" and from the https://dockerswarm.rocks/traefik/ docs:

  1. Set up DO Ubuntu machine and follow instructions to set up Traefik Proxy w/ HTTPS (https://dockerswarm.rocks/traefik/). I was successful here.

  2. Use cookiecutter to generate full-stack-fastapi-postgresql project.

  3. Develop/Test locally, also successful

  4. Build/Deploy: here is where I'm a little confused. Should I use docker-machine on my local computer or do I set up a swarm that I manage from my local machine? I'm confused with Docker's docs. I'm trying to build/deploy with your intended instructions.

I tried to set up a swarm "manager" on my local machine and then join the a "worker" which is my VPS on digital ocean but I got an error Error response from daemon: could not find local IP address: dial udp [my IPV6 address of local machine].

I also tried to provision with docker-machine but I'm getting the feeling that I should be using swarm. The Docker docs seem to state that docker-machine has been superseded.

Thanks in advance!

@duz-sg
Copy link

duz-sg commented Aug 27, 2019

I'm not an expert on this. But based on my understanding, you need to set up the docker swarm manager on your VPS, you don't need to setup docker swarm worker unless you are trying to build a cluster.

@ghost
Copy link

ghost commented Aug 27, 2019

I'm not an expert on this. But based on my understanding, you need to set up the docker swarm manager on your VPS, you don't need to setup docker swarm worker unless you are trying to build a cluster.

Thanks for your time!

I did just as you said and it works fine. I was hoping to figure out how to deploy/manage the swarm from my desktop but I just did that on the VPS swarm itself and it worked fine.

@tiangolo
Copy link
Owner

tiangolo commented Sep 1, 2019

Thanks for the help here @duz-sg 🍰🚀

@ben-siewert the idea is that you deploy from your cluster, you would clone your code there and deploy from there. That way you don't depend on your specific development machine or any special connection.

@break-paradigm yep, that's the idea, for the same reason as above 😊

If you want to automatize it more, you could connect a CI/CD system, with a CI "agent" program running on a manager node in your cluster (it might be just a single node) and then that CI agent could deploy your stack, from inside the same cluster. All this without you needing to connect your machine or depend on it.

@ghost
Copy link

ghost commented Sep 1, 2019

@tiangolo Thanks!

This is absolutely amazing! Thanks for creating this generator.

So I'm new to Github and a noob, do I close this issue? I actually tried from their docs and it didn't seem to work.

@tiangolo
Copy link
Owner

tiangolo commented Sep 6, 2019

Awesome! I still have to check some PRs and add some changes, but I'm glad it's working up to now for you 😬

It seems this issue was created by @ben-siewert, so, he's the one that could close it. I could do it as well, but I'm waiting a bit for him to check it. If you own both accounts, just let me know 😉

@beamsies
Copy link
Author

beamsies commented Sep 6, 2019

Sorry, I am break-paradigm as well.

Thanks again!

@beamsies beamsies closed this as completed Sep 6, 2019
@tiangolo
Copy link
Owner

tiangolo commented Sep 6, 2019

Awesome! Thanks for closing it! 🚀 🍰

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

No branches or pull requests

3 participants