-
-
Notifications
You must be signed in to change notification settings - Fork 0
Updated to the latest Vortex. #69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -31,7 +31,7 @@ ENV DRUPAL_PRIVATE_FILES=${DRUPAL_PRIVATE_FILES} | |
| ARG DRUPAL_TEMPORARY_FILES="${TMP:-/tmp}" | ||
| ENV DRUPAL_TEMPORARY_FILES=${DRUPAL_TEMPORARY_FILES} | ||
|
|
||
| ARG DRUPAL_THEME="drevops" | ||
| ARG DRUPAL_THEME="" | ||
| ENV DRUPAL_THEME=${DRUPAL_THEME} | ||
|
|
||
| ENV COMPOSER_ALLOW_SUPERUSER=1 \ | ||
|
|
@@ -47,11 +47,11 @@ ENV COMPOSER_ALLOW_SUPERUSER=1 \ | |
| # earlier in the build process (near the top of this file). | ||
|
|
||
| # Add more tools. | ||
| RUN apk add --no-cache ncurses pv tzdata autoconf g++ make \ | ||
| && pecl install pcov \ | ||
| && docker-php-ext-enable pcov \ | ||
| && docker-php-ext-install pcntl \ | ||
| && apk del g++ make autoconf | ||
| RUN apk add --no-cache ncurses pv tzdata autoconf g++ make && \ | ||
| pecl install pcov && \ | ||
| docker-php-ext-enable pcov && \ | ||
| docker-php-ext-install pcntl && \ | ||
| apk del g++ make autoconf | ||
|
|
||
| # Add patches and scripts. | ||
| COPY patches /app/patches | ||
|
|
@@ -72,33 +72,19 @@ COPY composer.json composer.* .env* auth* /app/ | |
| RUN if [ -n "${GITHUB_TOKEN}" ]; then export COMPOSER_AUTH="{\"github-oauth\": {\"github.com\": \"${GITHUB_TOKEN}\"}}"; fi && \ | ||
| COMPOSER_MEMORY_LIMIT=-1 composer install -n --no-dev --ansi --prefer-dist --optimize-autoloader | ||
|
|
||
| # Install NodeJS dependencies. | ||
| # Install NodeJS dependencies. | ||
| # Note that package-lock.json is not explicitly copied, allowing to run the | ||
| # stack without existing lock file (this is not advisable, but allows to build | ||
| # using latest versions of packages). package-lock.json should be comitted to | ||
| # the repository. | ||
| # File Gruntfile.js is copied into image as it is required to generate | ||
| # front-end assets. | ||
| COPY ${WEBROOT}/themes/custom/${DRUPAL_THEME}/package.json ${WEBROOT}/themes/custom/${DRUPAL_THEME}/package* /app/${WEBROOT}/themes/custom/${DRUPAL_THEME}/ | ||
| COPY ${WEBROOT}/themes/custom/${DRUPAL_THEME}/patches /app/${WEBROOT}/themes/custom/${DRUPAL_THEME}/patches | ||
|
|
||
| # Install NodeJS dependencies. | ||
| # Since Drupal does not use NodeJS in production, installing development | ||
| # dependencies here is fine — they are not exposed in any way. | ||
| RUN yarn --cwd="/app/${WEBROOT}/themes/custom/${DRUPAL_THEME}" install --frozen-lockfile --no-progress && yarn cache clean | ||
|
|
||
| # Copy all files into the application source directory. Existing files are | ||
| # always overwritten. | ||
| COPY . /app | ||
|
|
||
| # Create file directories and set correct permissions. | ||
| RUN mkdir -p "/app/${WEBROOT}/${DRUPAL_PUBLIC_FILES}" "/app/${WEBROOT}/${DRUPAL_PRIVATE_FILES}" "${DRUPAL_TEMPORARY_FILES}" && \ | ||
| chmod 0770 "/app/${WEBROOT}/${DRUPAL_PUBLIC_FILES}" "/app/${WEBROOT}/${DRUPAL_PRIVATE_FILES}" "${DRUPAL_TEMPORARY_FILES}" | ||
|
|
||
| # Compile front-end assets. This runs after copying all files, as source files | ||
| # are needed for compilation. | ||
| WORKDIR /app/${WEBROOT}/themes/custom/${DRUPAL_THEME} | ||
| RUN yarn run build | ||
| chmod 0770 "/app/${WEBROOT}/${DRUPAL_PUBLIC_FILES}" "/app/${WEBROOT}/${DRUPAL_PRIVATE_FILES}" "${DRUPAL_TEMPORARY_FILES}" | ||
|
|
||
| RUN if [ -n "${DRUPAL_THEME}" ]; then \ | ||
| theme_path="/app/${WEBROOT}/themes/custom/${DRUPAL_THEME}"; \ | ||
| yarn --cwd="${theme_path}" install --frozen-lockfile --no-progress && \ | ||
| yarn --cwd="${theme_path}" run build && \ | ||
| yarn cache clean; \ | ||
| fi | ||
|
Comment on lines
+83
to
+88
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Guard against missing theme path to prevent build failures If -RUN if [ -n "${DRUPAL_THEME}" ]; then \
- theme_path="/app/${WEBROOT}/themes/custom/${DRUPAL_THEME}"; \
- yarn --cwd="${theme_path}" install --frozen-lockfile --no-progress && \
- yarn --cwd="${theme_path}" run build && \
- yarn cache clean; \
- fi
+RUN if [ -n "${DRUPAL_THEME}" ] && [ -d "/app/${WEBROOT}/themes/custom/${DRUPAL_THEME}" ]; then \
+ yarn --cwd="/app/${WEBROOT}/themes/custom/${DRUPAL_THEME}" install --frozen-lockfile --no-progress && \
+ yarn --cwd="/app/${WEBROOT}/themes/custom/${DRUPAL_THEME}" run build && \
+ yarn cache clean; \
+ else \
+ echo "Skipping theme asset build – DRUPAL_THEME empty or path missing"; \
+ fi🤖 Prompt for AI Agents |
||
|
|
||
| WORKDIR /app | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -17,9 +17,9 @@ COPY .docker/config/solr/config-set /solr-conf/conf/ | |||||||||||||||||
|
|
||||||||||||||||||
| USER root | ||||||||||||||||||
|
|
||||||||||||||||||
| RUN sed -i -e "s#<dataDir>\${solr.data.dir:}#<dataDir>/var/solr/\${solr.core.name}#g" /solr-conf/conf/solrconfig.xml \ | ||||||||||||||||||
| && sed -i -e "s#solr.lock.type:native#solr.lock.type:none#g" /solr-conf/conf/solrconfig.xml \ | ||||||||||||||||||
| && sed -i -e "s#solr.autoSoftCommit.MaxTime=5000#solr.autoSoftCommit.MaxTime=-1#g" /solr-conf/conf/solrcore.properties | ||||||||||||||||||
| RUN sed -i -e "s#<dataDir>\${solr.data.dir:}#<dataDir>/var/solr/\${solr.core.name}#g" /solr-conf/conf/solrconfig.xml && \ | ||||||||||||||||||
| sed -i -e "s#solr.lock.type:native#solr.lock.type:none#g" /solr-conf/conf/solrconfig.xml && \ | ||||||||||||||||||
| sed -i -e "s#solr.autoSoftCommit.MaxTime=5000#solr.autoSoftCommit.MaxTime=-1#g" /solr-conf/conf/solrcore.properties | ||||||||||||||||||
|
Comment on lines
+20
to
+22
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick (assertive) Minor perf nit – combine the three Each -RUN sed -i -e "s#<dataDir>\${solr.data.dir:}#<dataDir>/var/solr/\${solr.core.name}#g" /solr-conf/conf/solrconfig.xml && \
- sed -i -e "s#solr.lock.type:native#solr.lock.type:none#g" /solr-conf/conf/solrconfig.xml && \
- sed -i -e "s#solr.autoSoftCommit.MaxTime=5000#solr.autoSoftCommit.MaxTime=-1#g" /solr-conf/conf/solrcore.properties
+RUN sed -i \
+ -e "s#<dataDir>\${solr.data.dir:}#<dataDir>/var/solr/\${solr.core.name}#g" \
+ -e "s#solr.lock.type:native#solr.lock.type:none#g" \
+ -e "s#solr.autoSoftCommit.MaxTime=5000#solr.autoSoftCommit.MaxTime=-1#g" \
+ /solr-conf/conf/solrconfig.xml /solr-conf/conf/solrcore.properties📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||
|
|
||||||||||||||||||
| USER solr | ||||||||||||||||||
|
|
||||||||||||||||||
|
|
||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick (assertive)
Shrink image by using a virtual build package group
You can avoid leaving behind
g++,make, andautoconflayers by installing them as a temporary virtual package and deleting it in one shot:📝 Committable suggestion
🤖 Prompt for AI Agents