-
Notifications
You must be signed in to change notification settings - Fork 0
/
start.sh
32 lines (23 loc) · 1.01 KB
/
start.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#! /bin/sh -
ufw enable
ufw deny 8091/tcp
/entrypoint.sh couchbase-server &
timeout 60 bash -c 'until echo > /dev/tcp/phpunit-couchbase/8091; do sleep 1; done'
# Setup Services
curl -u Administrator:password -v -X POST \
http://localhost:8091/node/controller/setupServices \
-d 'services=kv%2Cn1ql%2Cindex%2Cfts'
# Initialize Node
curl -v -X POST \
http://localhost:8091/nodes/self/controller/settings \
-d 'path=%2Fopt%2Fphpunit-couchbase%2Fvar%2Flib%2Fphpunit-couchbase%2Fdata&index_path=%2Fopt%2Fphpunit-couchbase%2Fvar%2Flib%2Fphpunit-couchbase%2Fdata'
# Setup Administrator username and password
curl -v -X POST \
http://localhost:8091/settings/web \
-d 'password=password&username=Administrator&port=SAME'
# Setup Bucket
curl -u Administrator:password -v -X POST \
http://localhost:8091/pools/default/buckets \
-d 'flushEnabled=1&threadsNumber=3&replicaIndex=0&replicaNumber=0&evictionPolicy=valueOnly&ramQuotaMB=597&bucketType=membase&name=default&authType=sasl&saslPassword='
ufw disable
sleep infinity