mirror of
https://github.com/crazy-max/diun.git
synced 2025-12-24 14:31:47 +01:00
Add swarm example
This commit is contained in:
24
.examples/swarm/diun.yml
Normal file
24
.examples/swarm/diun.yml
Normal file
@@ -0,0 +1,24 @@
|
||||
version: "3.5"
|
||||
|
||||
services:
|
||||
diun:
|
||||
image: crazymax/diun:latest
|
||||
volumes:
|
||||
- "./data:/data"
|
||||
- "/var/run/docker.sock:/var/run/docker.sock"
|
||||
environment:
|
||||
- "TZ=Europe/Paris"
|
||||
- "LOG_LEVEL=info"
|
||||
- "LOG_JSON=false"
|
||||
- "DIUN_WATCH_WORKERS=20"
|
||||
- "DIUN_WATCH_SCHEDULE=*/30 * * * *"
|
||||
- "DIUN_PROVIDERS_SWARM=true"
|
||||
deploy:
|
||||
mode: replicated
|
||||
replicas: 1
|
||||
labels:
|
||||
- "diun.enable=true"
|
||||
- "diun.watch_repo=true"
|
||||
placement:
|
||||
constraints:
|
||||
- node.role == manager
|
||||
15
.examples/swarm/nginx.yml
Normal file
15
.examples/swarm/nginx.yml
Normal file
@@ -0,0 +1,15 @@
|
||||
version: "3.5"
|
||||
|
||||
services:
|
||||
nginx:
|
||||
image: nginx
|
||||
ports:
|
||||
- target: 80
|
||||
published: 80
|
||||
protocol: udp
|
||||
deploy:
|
||||
mode: replicated
|
||||
replicas: 2
|
||||
labels:
|
||||
- "diun.enable=true"
|
||||
- "diun.watch_repo=true"
|
||||
Reference in New Issue
Block a user