Deployment using docker-machine
See original GitHub issueI’m having trouble getting deployment to work for the out-of-the-box “full-stack-fastapi-postgresql” template using the instructions on the README file as well as what I’ve read on DockerSwarm.rocks. Here are the steps I’ve taken:
- I used docker-machine to create a VPS on azure with docker installed.
- I set the domain name of the machine to “fastapitest” such that the DNS of the machine is
fastapitest.uksouth.cloudapp.azure.com
- I used cookiecutter to set up a project based on the “full-stack-fastapi-postgresql” template, I used the DNS name of the VPS set in (2) above for the “DOMAIN” variable during configuration and used docker-compose to check everything worked locally - wich it did
- I used
docker-machine env
so that I can run docker commands directly on the machine - I used
docker swarm init
to initialise a single machine cluster - I ran the “build” script as described in the README file:
TAG=prod FRONTEND_ENV=production bash ./scripts/build.sh
- I rang the “deploy” script as described in the README file:
DOMAIN=fastapitest.uksouth.cloudapp.azure.com \
TRAEFIK_TAG=fastapitest.uksouth.cloudapp.azure.com \
STACK_NAME=fastapitest \
TAG=prod \
bash ./scripts/deploy.sh
I get the following output:
WARNING: Some services (backend, db, flower, frontend, pgadmin, proxy) use the 'deploy' key, which will be ignored. Compose does not support 'deploy' configuration - use `docker stack deploy` to deploy to a swarm.
---
+++
Label: fastapitestTAG=prod.app-db-data
With value: true
Assigned to node in hostname: fastapi-test
With node ID: s885d1okylneu7043t9af6q2i
---
network "traefik-public" is declared as external, but could not be found. You need to create a swarm-scoped network before the stack is deployed
Do I need to create a network with that name on my VPS? Azure automatically sets up a Network interface with a Virtual Network/Subnet called: docker-machine-vnet/docker-machine
, is this releated?
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Use Compose in production - Docker Documentation
You can use Compose to deploy an app to a remote Docker host by setting the DOCKER_HOST , DOCKER_TLS_VERIFY , and DOCKER_CERT_PATH environment...
Read more >Deploy your app - Docker Documentation
Deploy your app. Build images · Run your image as a container · Use containers for development · Run tests · Configure CI/CD...
Read more >Get started with Docker Machine and a local VM
create a new (or start an existing) Docker virtual machine; switch your environment to your new VM; use the docker client to create,...
Read more >A beginner's guide to deploying a Docker application to ...
Docker Compose is a tool for managing multi-container applications such as a web application we discussed above. Each container acts as a ...
Read more >How to Get Started with Docker Machine - UpCloud
After the newly provisioned host replies that it is ready, you can employ the docker run command to deploy containers, granted that you ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@DrNickMartin
I’m not sure exactly what the problem is, but for what it’s worth this looks to me more likely to be a docker swarm configuration issue than a VPS issue.
If I had to guess, I think maybe you didn’t create the traefik-public network?
See here – search for the code block: