Switch branches/tags
Nothing to show
Find file History
Ward, Michael S Ward, Michael S
Ward, Michael S and Ward, Michael S add shebang so docker doesnt throw exec error
Latest commit 04ef085 Mar 24, 2017


Couchbase Docker Image

This directory shows how to build a custom Couchbase Docker image that:

  1. Setups memory for Index and Data

  2. Configures the Couchbase server with Index, Data, and Query service

  3. Sets up username and password credentials

Build the Image

docker build -t arungupta/couchbase .

Run the Container

docker-compose up -d

Cluster using Docker Services

  1. Create network:

    docker network create \
    -d overlay \
  2. Create master:

    docker service create \
    --name couchbase-master \
    --replicas 1 \
    -p 8091:8091 \
    --network couchbase \
    -e TYPE=MASTER \
  3. Create worker

    docker service create \
    --name couchbase-worker \
    --replicas 1 \
    --network couchbase \
    -e TYPE=WORKER \
    -e COUCHBASE_MASTER=couchbase-master.couchbase \
    -e AUTO_REBALANCE=false \
  4. Scale cluster

    docker service scale couchbase-worker=2

Cluster using Kubernetes

  1. Create Master RC

    kubectl.sh create -f master-service.yml
  2. Create Worker RC

    kubectl.sh create -f worker-service.yml
  3. Scale cluster

    kubectl.sh scale --replicas=3 -f worker-service.yml