Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions .github/workflows/post-release-push-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,30 +17,39 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
persist-credentials: true

- name: Set up QEMU (for multi-arch builds)
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to Docker Hub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

# All-in-one Image Steps
# All-in-one Image Steps (multi-arch: amd64 + arm64)
- name: Extract metadata (tags, labels) for All-in-one Docker
id: meta_all_in_one
uses: docker/metadata-action@v3
uses: docker/metadata-action@v5
with:
images: daveearley/hi.events-all-in-one
tags: |
type=ref,event=tag
type=raw,value=latest,enable=${{ github.event.release.prerelease == false }}

- name: Build and push All-in-one Docker image
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
context: ./
file: ./Dockerfile.all-in-one
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta_all_in_one.outputs.tags }}
labels: ${{ steps.meta_all_in_one.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max

# Backend Image Steps
- name: Extract metadata (tags, labels) for Backend Docker
Expand Down
13 changes: 10 additions & 3 deletions Dockerfile.all-in-one
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,26 @@ WORKDIR /app/frontend

RUN apk add --no-cache yarn

# Increase network timeout for slow ARM emulation builds
RUN yarn config set network-timeout 600000

COPY ./frontend/package.json ./frontend/yarn.lock ./

COPY ./frontend .

RUN yarn install && yarn build
RUN yarn install --network-timeout 600000 --frozen-lockfile && yarn build

FROM serversideup/php:beta-8.3.2-fpm-alpine
# Use stable multi-arch serversideup/php image
FROM serversideup/php:8.3-fpm-alpine

ENV PHP_OPCACHE_ENABLE=1

# Switch to root for installing extensions and packages
USER root

RUN install-php-extensions intl

RUN apk add --no-cache nodejs yarn nginx supervisor
RUN apk add --no-cache nodejs yarn nginx supervisor dos2unix

COPY --from=node-frontend /app/frontend /app/frontend

Expand Down