Skip to content

Instantly share code, notes, and snippets.

@dszmaj
Created October 24, 2019 13:00
Show Gist options
  • Save dszmaj/cd03d7a9dfd57ec2995cc68f83ac8f23 to your computer and use it in GitHub Desktop.
Save dszmaj/cd03d7a9dfd57ec2995cc68f83ac8f23 to your computer and use it in GitHub Desktop.
ArangoDB 3.5 Cluster Config with Volumes Example
version: '3'
services:
agency:
container_name: agency
image: arangodb:3.5
restart: unless-stopped
environment:
- ARANGO_NO_AUTH=1
command:
- arangod
- --agency.my-address=tcp://agency:5001
- --server.endpoint=tcp://0.0.0.0:5001
- --server.authentication=false
- --agency.activate=true
- --agency.size=1
- --agency.supervision=true
- --database.directory=/var/lib/agency
volumes:
- agency:/var/lib/agency
coordinator:
container_name: coordinator
image: arangodb:3.5
restart: unless-stopped
environment:
- ARANGO_NO_AUTH=1
command:
- arangod
- --server.authentication=false
- --server.endpoint=tcp://0.0.0.0:8529
- --cluster.my-address=tcp://coordinator:8529
- --cluster.my-role=COORDINATOR
- --cluster.agency-endpoint=tcp://agency:5001
- --database.directory=/var/lib/coordinator
volumes:
- coordinator:/var/lib/coordinator
ports:
- 8529:8529
depends_on:
- agency
db1:
container_name: db1
image: arangodb:3.5
restart: unless-stopped
environment:
- ARANGO_NO_AUTH=1
command:
- arangod
- --server.authentication=false
- --server.endpoint=tcp://0.0.0.0:8529
- --cluster.my-address=tcp://db1:8529
- --cluster.my-role=DBSERVER
- --cluster.agency-endpoint=tcp://agency:5001
- --database.directory=/var/lib/db
volumes:
- db1:/var/lib/db
depends_on:
- agency
db2:
container_name: db2
image: arangodb:3.5
restart: unless-stopped
environment:
- ARANGO_NO_AUTH=1
command:
- arangod
- --server.authentication=false
- --server.endpoint=tcp://0.0.0.0:8529
- --cluster.my-address=tcp://db2:8529
- --cluster.my-role=DBSERVER
- --cluster.agency-endpoint=tcp://agency:5001
- --database.directory=/var/lib/db
volumes:
- db2:/var/lib/db
depends_on:
- agency
db3:
container_name: db3
image: arangodb:3.5
restart: unless-stopped
environment:
- ARANGO_NO_AUTH=1
command:
- arangod
- --server.authentication=false
- --server.endpoint=tcp://0.0.0.0:8529
- --cluster.my-address=tcp://db3:8529
- --cluster.my-role=DBSERVER
- --cluster.agency-endpoint=tcp://agency:5001
- --database.directory=/var/lib/db
volumes:
- db3:/var/lib/db
depends_on:
- agency
db4:
container_name: db4
image: arangodb:3.5
restart: unless-stopped
environment:
- ARANGO_NO_AUTH=1
command:
- arangod
- --server.authentication=false
- --server.endpoint=tcp://0.0.0.0:8529
- --cluster.my-address=tcp://db4:8529
- --cluster.my-role=DBSERVER
- --cluster.agency-endpoint=tcp://agency:5001
- --database.directory=/var/lib/db
volumes:
- db4:/var/lib/db
depends_on:
- agency
networks:
default:
volumes:
agency:
coordinator:
db1:
db2:
db3:
db4:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment