| #!/bin/bash |
| |
| |
|
|
| /entrypoint.sh couchbase-server & |
|
|
| |
| FILE=/opt/couchbase/init/setupComplete.txt |
|
|
| if ! [ -f "$FILE" ]; then |
| |
| |
|
|
| echo $COUCHBASE_ADMINISTRATOR_USERNAME ":" $COUCHBASE_ADMINISTRATOR_PASSWORD |
|
|
| sleep 20s |
| /opt/couchbase/bin/couchbase-cli cluster-init -c 127.0.0.1 \ |
| --cluster-username $COUCHBASE_ADMINISTRATOR_USERNAME \ |
| --cluster-password $COUCHBASE_ADMINISTRATOR_PASSWORD \ |
| --services data,index,query,fts \ |
| --cluster-ramsize $COUCHBASE_RAM_SIZE \ |
| --cluster-index-ramsize $COUCHBASE_INDEX_RAM_SIZE \ |
| --cluster-eventing-ramsize $COUCHBASE_EVENTING_RAM_SIZE \ |
| --cluster-fts-ramsize $COUCHBASE_FTS_RAM_SIZE \ |
| --index-storage-setting default |
|
|
| sleep 2s |
|
|
| |
| |
|
|
| /opt/couchbase/bin/couchbase-cli bucket-create -c localhost:8091 \ |
| --username $COUCHBASE_ADMINISTRATOR_USERNAME \ |
| --password $COUCHBASE_ADMINISTRATOR_PASSWORD \ |
| --bucket $COUCHBASE_BUCKET \ |
| --bucket-ramsize $COUCHBASE_BUCKET_RAMSIZE \ |
| --bucket-type couchbase |
|
|
| |
| touch $FILE |
| fi |
| |
| |
| tail -f /dev/null |
|
|