diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 670a098..264af03 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,15 +26,6 @@ jobs: uses: docker/setup-qemu-action@v1 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 - - name: Cache Composer dependencies - uses: actions/cache@v2 - with: - path: /tmp/composer-cache - key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }} - - uses: php-actions/composer@v6 - with: - php_version: 8.1 - args: --ignore-platform-reqs - name: Bake uses: docker/bake-action@v2.1.0 with: diff --git a/Dockerfile.mariadb b/Dockerfile.mariadb index cec5298..fdb9cfb 100644 --- a/Dockerfile.mariadb +++ b/Dockerfile.mariadb @@ -10,6 +10,7 @@ RUN echo "APT::Acquire::Retries \"5\";" > /etc/apt/apt.conf.d/80-retries && \ apt-get -qq update && \ apt-get -yqq upgrade && \ apt-get -yqq install --no-install-recommends \ + curl \ xz-utils \ dos2unix \ runit \ @@ -39,14 +40,15 @@ RUN echo "APT::Acquire::Retries \"5\";" > /etc/apt/apt.conf.d/80-retries && \ apt-get autoremove -yqq && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /var/lib/dpkg/status.old /var/cache/debconf/templates.dat /var/log/dpkg.log /var/log/lastlog /var/log/apt/*.log - +RUN curl https://getcomposer.org/composer-stable.phar --output /usr/local/bin/composer && \ + chmod +x /usr/local/bin/composer COPY start.sh /usr/local/bin/start.sh COPY mysql.runit /etc/service/mysql/run COPY sync-pull.runit /etc/service/sync-pull/run COPY sync-push.runit /etc/service/sync-push/run VOLUME /dumps WORKDIR /sync -COPY vendor /sync/vendor +COPY composer.* /sync/ COPY syncer /sync/syncer COPY sync /sync/sync COPY start.sh /sync/start.sh diff --git a/Dockerfile.postgres b/Dockerfile.postgres index f756692..5bf4a11 100644 --- a/Dockerfile.postgres +++ b/Dockerfile.postgres @@ -9,7 +9,8 @@ RUN apk add --no-cache runit && \ libavif \ && \ apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing/ --allow-untrusted gnu-libiconv \ - # Packages + # Packages \ + curl \ tini \ php81 \ php81-dev \ @@ -42,14 +43,16 @@ RUN apk add --no-cache runit && \ php81-pecl-apcu \ ncurses \ xz \ - && ln -s /usr/bin/php81 /usr/bin/php + && ln -s /usr/bin/php81 /usr/bin/php \ +RUN curl https://getcomposer.org/composer-stable.phar --output /usr/local/bin/composer && \ + chmod +x /usr/local/bin/composer COPY start.sh /usr/local/bin/start.sh COPY postgres.runit /etc/service/postgres/run COPY sync-pull.runit /etc/service/sync-pull/run COPY sync-push.runit /etc/service/sync-push/run VOLUME /dumps WORKDIR /sync -COPY vendor /sync/vendor +COPY composer.* /sync COPY syncer /sync/syncer COPY sync /sync/sync COPY start.sh /sync/start.sh diff --git a/bake.hcl b/bake.hcl index 7b94bb0..f80b53d 100644 --- a/bake.hcl +++ b/bake.hcl @@ -1,10 +1,10 @@ group "default" { targets = [ - #"postgres-14", - #"postgres-13", - #"postgres-12", - #"postgres-11", - #"postgres-10", + "postgres-14", + "postgres-13", + "postgres-12", + "postgres-11", + "postgres-10", "mariadb-10-9", #"mariadb-10-8", #"mariadb-10-7", diff --git a/composer.json b/composer.json index 5dd40b0..c11247d 100644 --- a/composer.json +++ b/composer.json @@ -31,5 +31,10 @@ "name": "Matthew Baggett", "email": "matthew@baggett.me" } - ] + ], + "config": { + "preferred-install": { + "*": "dist" + } + } }