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
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With