Refactor Couchbase 2.5 Docker setup and scripts

Updated Dockerfile to add libssl0.9.8, split some RUN commands, and improved permissions handling. Modified entrypoint.sh to use 'set -ex' for better debugging and switched to 'runsvdir -P /etc/service' for process management. Cleaned up docker-compose.example.yml by commenting out unused options. Updated run script to unset HOME before execution for improved environment consistency.
This commit is contained in:
tiennm99 committed 2025-10-05 22:30:23 +07:00
1 parent 035484e5cf
commit a9d0d65fa4
4 files changed
+19 -10

No files matched your search

+5 -2
View File
@@ -1,10 +1,11 @@
#!/bin/bash
set -e
set -ex
staticConfigFile=/opt/couchbase/etc/couchbase/static_config
restPortValue=8091
# see https://developer.couchbase.com/documentation/server/current/install/install-ports.html
# https://docs.couchbase.com/couchbase-manual-2.5/cb-install/#network-ports
function overridePort() {
portName=$1
portNameUpper=$(echo $portName | awk '{print toupper($0)}')
@@ -39,6 +40,7 @@ overridePort "ssl_proxy_downstream_port"
overridePort "ssl_proxy_upstream_port"
# if [ "$1" == "couchbase-server" ] && [ ! -d "/etc/service" ]; then
[[ "$1" == "couchbase-server" ]] && {
if [ "$(whoami)" = "couchbase" ]; then
@@ -53,7 +55,8 @@ overridePort "ssl_proxy_upstream_port"
fi
echo "Starting Couchbase Server -- Web UI available at http://<ip>:$restPortValue"
echo "and logs available in /opt/couchbase/var/lib/couchbase/logs"
exec /usr/sbin/runsvdir-start
exec /usr/sbin/runsvdir -P /etc/service
}
# fi
exec "$@"
+2
View File
@@ -1,5 +1,7 @@
#!/bin/sh
unset HOME
exec 2>&1
# Create directories where couchbase stores its data