Skip to content

Instantly share code, notes, and snippets.

@amastracci
Last active April 27, 2018 21:40
Show Gist options
  • Save amastracci/5e34d586c6a682e0eb91dc2ead9b5ed8 to your computer and use it in GitHub Desktop.
Save amastracci/5e34d586c6a682e0eb91dc2ead9b5ed8 to your computer and use it in GitHub Desktop.
SwarmDB Sample docker-compose
version: '2'
services:
swarm01:
image: bluzelle/swarmdb:alpha
ports:
- "51010:51010"
environment:
SWARM_UUID: "92b8bac6-3242-452a-9090-1aa48afd71a3"
SWARM_NAME: "daemon01"
SWARM_PORT: "51010"
SWARM_BOOTSTRAP_URL: "<peers URL>"
expose:
- "51010"
networks:
swarmnet:
ipv4_address: 10.5.0.4
volumes:
- /tmp:/tmp/swarm_home
restart_policy:
condition: on-failure
swarm02:
image: bluzelle/swarmdb:alpha
ports:
- "51011:51011"
environment:
SWARM_UUID: "c864516b-3c95-4721-ad3e-a8dccd0d8349"
SWARM_NAME: "daemon02"
SWARM_PORT: "51011"
SWARM_BOOTSTRAP_URL: "<peers URL>"
expose:
- "51011"
networks:
swarmnet:
ipv4_address: 10.5.0.5
volumes:
- /tmp:/tmp/swarm_home
restart_policy:
condition: on-failure
swarm03:
image: bluzelle/swarmdb:alpha
ports:
- "51012:51012"
environment:
SWARM_UUID: "137a8403-52ec-43b7-8083-91391d4c5e67"
SWARM_NAME: "daemon03"
SWARM_PORT: "51012"
SWARM_BOOTSTRAP_URL: "<peers URL>"
expose:
- "51012"
networks:
swarmnet:
ipv4_address: 10.5.0.6
volumes:
- /tmp:/tmp/swarm_home
restart_policy:
condition: on-failure
networks:
swarmnet:
driver: bridge
ipam:
config:
- subnet: 10.5.0.0/16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment