docker swarm
All checks were successful
Build, Test & Publish / Build (pull_request) Successful in 26s
Build, Test & Publish / Build and Publish Container Image (pull_request) Has been skipped
Build, Test & Publish / Deploy to Infrastructure (pull_request) Has been skipped

This commit is contained in:
2025-10-22 13:11:59 +11:00
parent 587287fb82
commit dd30ade94b
3 changed files with 35 additions and 0 deletions

View File

@@ -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/',

View 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).
:::

View File

@@ -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/