Skip to content

Commit

Permalink
Merge pull request #276 from mollux/fix-composer-2.7.0-incompatibility
Browse files Browse the repository at this point in the history
Ensure composer is allowed to run as root in the builder step
  • Loading branch information
mollux committed Apr 16, 2024
2 parents 6ebb1d6 + df611ff commit 084bcee
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 2 deletions.
File renamed without changes.
27 changes: 27 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Test build Docker image

on:
pull_request:
schedule:
# Run every day at 10:45 AM UTC to discover potential issues with dependencies like PHP updates etc.
- cron: '45 10 * * *'

jobs:
build-image:
runs-on: ubuntu-latest
strategy:
matrix:
image_type: [apache, fpm]
permissions:
contents: read

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
file: ${{ matrix.image_type }}/Dockerfile
context: .
tags: ${{ matrix.image_type }}-test
2 changes: 1 addition & 1 deletion apache/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ RUN echo "memory_limit = -1" > /usr/local/etc/php/php.ini
ARG MAUTIC_VERSION=5.x-dev

RUN cd /opt && \
COMPOSER_PROCESS_TIMEOUT=10000 composer create-project mautic/recommended-project:${MAUTIC_VERSION} mautic --no-interaction && \
COMPOSER_ALLOW_SUPERUSER=1 COMPOSER_PROCESS_TIMEOUT=10000 composer create-project mautic/recommended-project:${MAUTIC_VERSION} mautic --no-interaction && \
rm -rf /opt/mautic/var/cache/js && \
find /opt/mautic/node_modules -mindepth 1 -maxdepth 1 -not \( -name 'jquery' -or -name 'vimeo-froogaloop2' \) | xargs rm -rf

Expand Down
2 changes: 1 addition & 1 deletion fpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ RUN echo "memory_limit = -1" > /usr/local/etc/php/php.ini
ARG MAUTIC_VERSION=5.x-dev

RUN cd /opt && \
COMPOSER_PROCESS_TIMEOUT=10000 composer create-project mautic/recommended-project:${MAUTIC_VERSION} mautic --no-interaction && \
COMPOSER_ALLOW_SUPERUSER=1 COMPOSER_PROCESS_TIMEOUT=10000 composer create-project mautic/recommended-project:${MAUTIC_VERSION} mautic --no-interaction && \
rm -rf /opt/mautic/var/cache/js && \
find /opt/mautic/node_modules -mindepth 1 -maxdepth 1 -not \( -name 'jquery' -or -name 'vimeo-froogaloop2' \) | xargs rm -rf

Expand Down

0 comments on commit 084bcee

Please sign in to comment.