Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

couchbase command while docker setup

I am running couchbase using docker[on windows]. When I start it ask for doing cluster setup.

I want to customize docker-compose file to do below setup

1. set a cluster name
2. set up a admin account
3. create a empty bucket.

My docker compose file

version: '3'
services:
  couchbase:
    image: couchbase/server
    ports:
      - 11210:11210
      - "8091-8094:8091-8094" 
    volumes:
      - /opt/couchbase/data:/opt/couchbase/var
    env_file: .env
like image 936
dead programmer Avatar asked Aug 31 '26 18:08

dead programmer


1 Answers

You can read about a solution here using Couchbase with Docker Compose - behind the scenes it uses REST API calls to initialize the database and create buckets.

His docker file includes a configuration script to this:

FROM couchbase/server:enterprise-4.5.0-DP1

COPY configure-node.sh /opt/couchbase

CMD ["/opt/couchbase/configure-node.sh"]

You can find contents of the script here on Github as a good starting point.

like image 189
1tylermitchell Avatar answered Sep 03 '26 23:09

1tylermitchell



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!