diff --git a/apps/meteor/deploy/compose.yml b/apps/meteor/deploy/compose.yml index 6ec2fef071675..2686d54ca8477 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 6e99a502a38b3..af53f42d45ca8 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 @@ -142,9 +142,14 @@ install_docker_compose() { fi ;; 'centos') - # do stuff + if [[ -n "$(yum -C -e0 -q search docker-compose-plugin)" ]]; then + run yum install -y docker-compose-plugin || error "failed to install compose v2" + return + fi ;; 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 +203,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"