Finished CLI Installer for SuiteCRM Implementation (LDAP still missing) - https://chatgpt.com/share/69274924-9dec-800f-8653-345aa2c25664

This commit is contained in:
2025-11-27 04:02:04 +01:00
parent 6d6b0fdea6
commit b80cfbdc9d
6 changed files with 75 additions and 25 deletions

View File

@@ -13,6 +13,8 @@ RUN apt-get update && apt-get install -y \
libldap2-dev \
&& docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu \
&& docker-php-ext-install \
pdo \
pdo_mysql \
mysqli \
gd \
zip \
@@ -23,6 +25,13 @@ RUN apt-get update && apt-get install -y \
ldap \
&& rm -rf /var/lib/apt/lists/*
RUN { \
echo 'file_uploads = On'; \
echo 'upload_max_filesize = 32M'; \
echo 'post_max_size = 32M'; \
echo 'memory_limit = 512M'; \
} > /usr/local/etc/php/conf.d/suitecrm-upload.ini
# Install Apache modules
RUN a2enmod rewrite headers
@@ -48,12 +57,31 @@ RUN set -eux; \
# Install PHP dependencies via Composer (critical!)
RUN set -eux; \
composer install \
--no-dev \
--prefer-dist \
--no-interaction \
--optimize-autoloader \
--no-scripts
# Legacy (SugarCRM) dependencies Tinymce etc.
WORKDIR /var/www/html/public/legacy
RUN set -eux; \
if [ -f composer.json ]; then \
composer install --prefer-dist --no-interaction --optimize-autoloader --no-scripts; \
fi
WORKDIR /var/www/html
# Install Node + Corepack
RUN apt-get update && apt-get install -y nodejs npm \
&& corepack enable && corepack prepare yarn@4.5.1 --activate
WORKDIR /var/www/html
RUN yarn install --immutable \
&& yarn merge-angular-json \
&& yarn build
# Copy entrypoint
COPY {{ SUITECRM_ENTRYPOINT_SCRIPT_HOST_REL }} {{ SUITECRM_ENTRYPOINT_SCRIPT_DOCKER }}
RUN chmod +x {{ SUITECRM_ENTRYPOINT_SCRIPT_DOCKER }}

View File

@@ -50,11 +50,11 @@ SUITECRM_EMAIL_FROM_NAME={{ applications | get_app_conf(application_id, 'email.f
AUTH_TYPE=ldap
LDAP_HOST={{ LDAP.SERVER.DOMAIN }}
LDAP_PORT={{ LDAP.SERVER.PORT }}
LDAP_ENCRYPTION={{ LDAP.SERVER.SECURITY | lower if LDAP.SERVER.SECURITY else "none" }} # none|ssl|tls
LDAP_ENCRYPTION={{ LDAP.SERVER.SECURITY | lower if LDAP.SERVER.SECURITY else "none" }}
LDAP_BASE_DN={{ LDAP.DN.OU.USERS }}
LDAP_BIND_DN={{ LDAP.DN.ADMINISTRATOR.DATA }}
LDAP_BIND_PASSWORD={{ LDAP.BIND_CREDENTIAL }}
LDAP_UID_KEY={{ LDAP.USER.ATTRIBUTES.ID }} # e.g. uid or mail
LDAP_UID_KEY={{ LDAP.USER.ATTRIBUTES.ID }}
{% else %}
AUTH_TYPE=disabled
{% endif %}
@@ -63,3 +63,5 @@ AUTH_TYPE=disabled
# Maintenance mode toggle
# ------------------------------------------------
SUITECRM_MAINTENANCE={{ SUITECRM_INIT_MAINTENANCE_MODE | lower }}
NODE_OPTIONS=--max-old-space-size={{ SUITECRM_MAX_OLD_SPACE_SIZE }}