docker swarm
This commit is contained in:
@@ -76,6 +76,10 @@ export default defineConfig({
|
||||
{ text: 'Local DB (PostgreSQL)', link: '/docker/local-db-pg' },
|
||||
]
|
||||
},
|
||||
{
|
||||
text: 'Docker Swarm',
|
||||
link: '/docker-swarm/',
|
||||
},
|
||||
{
|
||||
text: 'EF Core',
|
||||
link: '/ef-core/',
|
||||
|
27
docs/docker-swarm/index.md
Normal file
27
docs/docker-swarm/index.md
Normal file
@@ -0,0 +1,27 @@
|
||||
# Docker Swarm Snippets and Musings
|
||||
|
||||
## Updating Services
|
||||
|
||||
View services:
|
||||
|
||||
```bash
|
||||
docker service ls
|
||||
```
|
||||
|
||||
To scale a service up or down:
|
||||
|
||||
```bash
|
||||
docker service scale <service_name>=<number_of_replicas>
|
||||
```
|
||||
|
||||
Sometimes services get stuck or need to be forcefully updated:
|
||||
|
||||
```bash
|
||||
docker service update --force <service_name>
|
||||
```
|
||||
|
||||
::: tip
|
||||
|
||||
Sometimes if you need to force containers to restart use the update force (e.g. after restarting a node).
|
||||
|
||||
:::
|
@@ -26,6 +26,10 @@ hero:
|
||||
text: Docker
|
||||
link: /docker/
|
||||
|
||||
- theme: alt
|
||||
text: Docker Swarm
|
||||
link: /docker-swarm/
|
||||
|
||||
- theme: alt
|
||||
text: EF Core
|
||||
link: /ef-core/
|
||||
|
Reference in New Issue
Block a user