diff --git a/apps/meteor/deploy/compose.yml b/apps/meteor/deploy/compose.yml index 6ec2fef07167..2686d54ca847 100644 --- a/apps/meteor/deploy/compose.yml +++ b/apps/meteor/deploy/compose.yml @@ -22,7 +22,7 @@ services: -mongodb://${MONGODB_ROOT_USER:-root}:${MONGODB_ROOT_PASSWORD}@${MONGODB_ADVERTISED_HOSTNAME:-mongodb}:\ ${MONGODB_INITIAL_PRIMARY_PORT_NUMBER:-27017}/\ local?authSource=admin&replicaSet=${MONGODB_REPLICA_SET_NAME:-rs0}}" - ROOT_URL: ${ROOT_URL:-http://localhost:${HOST_PORT}} + ROOT_URL: ${ROOT_URL:-http://localhost:${HOST_PORT:-3000}} PORT: ${PORT:-3000} depends_on: [mongodb] expose: @@ -41,8 +41,8 @@ services: - mongodb_data:/bitnami/mongodb # using the long format to avoid docker automatically creating the source on host - type: bind - source: ./user_set_role_cluster_admin.sh - target: /docker-entrypoint-initdb.d/user_set_role_cluster_admin.sh + source: ./user_set_role_cluster_monitor.sh + target: /docker-entrypoint-initdb.d/user_set_role_cluster_monitor.sh read_only: true environment: BITNAMI_DEBUG: 'true' @@ -59,4 +59,4 @@ services: MONGODB_USERNAME: ${MONGODB_USERNAME:-rocketchat} MONGODB_PASSWORD: ${MONGODB_PASSWORD?must pass database user password} MONGODB_DATABASE: ${MONGODB_DATABASE:-rocketchat} - MONGODB_REPLICA_SET_KEY: ${MONGODB_REPLICA_SET_KEY?must pass a key; key length >=5} \ No newline at end of file + MONGODB_REPLICA_SET_KEY: ${MONGODB_REPLICA_SET_KEY:-replaceme} \ No newline at end of file diff --git a/apps/meteor/deploy/deploy-docker.sh b/apps/meteor/deploy/deploy-docker.sh index 6e99a502a38b..b06b500bb00a 100644 --- a/apps/meteor/deploy/deploy-docker.sh +++ b/apps/meteor/deploy/deploy-docker.sh @@ -52,7 +52,7 @@ _substitute_or_inject_variable() { local variable=${1?} value=${2?} file=${3?} ((DRY_RUN)) && { info "$variable=$value"; return; } if grep -Eq "^$variable=.+" $file && ! ((FORCE)); then - warn "value for \"$variable\" already exists; skipping" + warn "value for \"$variable\" already exists; skipping; use --force to overwrite" return fi # comment out the existing value and put the new value in @@ -134,17 +134,11 @@ install_docker_compose() { local distro="$(. /etc/os-release; echo $ID)" case $distro in - 'ubuntu'|'debian') - if [[ -n "$(apt search docker-compose-plugin -qqq)" ]]; then - run apt install docker-compose-plugin -yqqq || error "failed to install compose v2" - success_msg "compose v2 successfully installed" - return - fi - ;; - 'centos') - # do stuff - ;; + 'ubuntu'|'debian') [[ -n "$(apt search docker-compose-plugin -qqq)" ]] && run apt install docker-compose-plugin -yqqq || error "failed to install compose v2" ;; + 'centos') [[ -n "$(yum -C -e0 -q search docker-compose-plugin)" ]] && run yum install -y docker-compose-plugin || error "failed to install compose v2" ;; esac + &>/dev/null docker compose version && { success_msg "compose v2 sucessfully installed"; return; } + # well if we're here compose isn't in the repo or something else went wrong; manual install may still work warn "compose v2 not found on the repos...attempting manual install" do_install_compose } @@ -198,6 +192,8 @@ deploy() { read -p "please enter your domain name (without the 'https://'): " domain _substitute_or_inject_variable DOMAIN $domain .env _substitute_or_inject_variable ROOT_URL "https://$domain" .env + read -p "please enter your email address for TLS certificate renewal: " email + _substitute_or_inject_variable LETSENCRYPT_EMAIL $email .env fi info "pulling docker images"