Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
284 commits
Select commit Hold shift + click to select a range
6b7262f
Update config.yml
b23prodtm Jan 31, 2026
908a4dc
Update config.yml
b23prodtm Jan 31, 2026
9a3f486
Enhance CI workflow with deployment step
b23prodtm Feb 1, 2026
c7a2143
circleci yml
b23prodtm Feb 1, 2026
22b4adf
x86_64 pushed ./deployment/images/httpd
b23prodtm Feb 1, 2026
f815c73
x86_64 pushed ./deployment/images/mysqldb
b23prodtm Feb 1, 2026
e6312ec
x86_64 pushed ./balena-storage
b23prodtm Feb 1, 2026
3ce15b5
aarch64 pushed ./deployment/images/httpd
b23prodtm Feb 1, 2026
8c13f0a
aarch64 pushed ./deployment/images/mysqldb
b23prodtm Feb 1, 2026
e89f954
aarch64 pushed ./balena-storage
b23prodtm Feb 1, 2026
8246c21
Updated Templates
b23prodtm Feb 1, 2026
4f3a542
armhf pushed ./deployment/images/httpd
b23prodtm Feb 1, 2026
bcfa3a6
armhf pushed ./deployment/images/mysqldb
b23prodtm Feb 1, 2026
b6bfe31
armhf pushed ./balena-storage
b23prodtm Feb 1, 2026
939802c
armhf pushed ./deployment/images/httpd
b23prodtm Feb 1, 2026
f27a54f
armhf pushed ./deployment/images/mysqldb
b23prodtm Feb 1, 2026
b65c76d
armhf pushed ./balena-storage
b23prodtm Feb 1, 2026
e1a9b02
x86_64 pushed ./deployment/images/httpd
b23prodtm Feb 1, 2026
1100c4f
x86_64 pushed ./deployment/images/mysqldb
b23prodtm Feb 1, 2026
73e0328
x86_64 pushed ./balena-storage
b23prodtm Feb 1, 2026
f02e68a
aarch64 pushed ./deployment/images/httpd
b23prodtm Feb 1, 2026
49703ab
aarch64 pushed ./deployment/images/mysqldb
b23prodtm Feb 1, 2026
920fa8a
aarch64 pushed ./balena-storage
b23prodtm Feb 1, 2026
0aca7a4
Updated Templates
b23prodtm Feb 1, 2026
6e489c3
armhf pushed ./deployment/images/httpd
b23prodtm Feb 1, 2026
7340256
armhf pushed ./deployment/images/mysqldb
b23prodtm Feb 1, 2026
0c09e5e
armhf pushed ./balena-storage
b23prodtm Feb 1, 2026
e9e33ac
armhf pushed ./deployment/images/httpd
b23prodtm Feb 1, 2026
8ac6e12
aarch64 pushed ./deployment/images/httpd
b23prodtm Feb 1, 2026
f36e5cb
aarch64 pushed ./deployment/images/mysqldb
b23prodtm Feb 1, 2026
d9e6bef
aarch64 pushed ./balena-storage
b23prodtm Feb 1, 2026
ba9df63
buildx process
b23prodtm Feb 1, 2026
a3da33a
build files
b23prodtm Feb 1, 2026
3f792b6
armhf pushed ./deployment/images/httpd
b23prodtm Feb 1, 2026
7f2f8cd
armhf pushed ./deployment/images/mysqldb
b23prodtm Feb 1, 2026
84d673c
armhf pushed ./balena-storage
b23prodtm Feb 1, 2026
3fa4c13
x86_64 pushed ./deployment/images/httpd
b23prodtm Feb 1, 2026
933d436
x86_64 pushed ./deployment/images/mysqldb
b23prodtm Feb 1, 2026
60947cf
x86_64 pushed ./balena-storage
b23prodtm Feb 1, 2026
e2fd2bc
aarch64 pushed ./deployment/images/httpd
b23prodtm Feb 1, 2026
ff21e4c
aarch64 pushed ./deployment/images/mysqldb
b23prodtm Feb 1, 2026
37c3351
aarch64 pushed ./balena-storage
b23prodtm Feb 1, 2026
4eca553
Updated Templates
b23prodtm Feb 1, 2026
ce4aee9
armhf pushed ./deployment/images/httpd
b23prodtm Feb 1, 2026
1e35f85
armhf pushed ./deployment/images/mysqldb
b23prodtm Feb 1, 2026
6df10f9
armhf pushed ./balena-storage
b23prodtm Feb 1, 2026
bbfcca1
armhf pushed ./deployment/images/httpd
b23prodtm Feb 1, 2026
3695c22
armhf pushed ./balena-storage
b23prodtm Feb 1, 2026
7ae9886
x86_64 pushed ./deployment/images/httpd
b23prodtm Feb 1, 2026
2b7209f
x86_64 pushed ./deployment/images/mysqldb
b23prodtm Feb 1, 2026
a29cd56
x86_64 pushed ./balena-storage
b23prodtm Feb 1, 2026
86e6c6f
aarch64 pushed ./deployment/images/httpd
b23prodtm Feb 1, 2026
0439eb6
aarch64 pushed ./deployment/images/mysqldb
b23prodtm Feb 1, 2026
f4a2ea9
aarch64 pushed ./balena-storage
b23prodtm Feb 1, 2026
bae686a
Updated Templates
b23prodtm Feb 1, 2026
f7e2580
armhf pushed ./deployment/images/httpd
b23prodtm Feb 1, 2026
908be8e
armhf pushed ./deployment/images/mysqldb
b23prodtm Feb 1, 2026
05d2523
armhf pushed ./balena-storage
b23prodtm Feb 1, 2026
36aa8e5
armhf pushed ./deployment/images/httpd
b23prodtm Feb 1, 2026
a83faef
armhf pushed ./deployment/images/httpd
b23prodtm Feb 1, 2026
9ea7b2c
armhf pushed ./deployment/images/mysqldb
b23prodtm Feb 1, 2026
55f3148
x86_64 pushed ./deployment/images/httpd
b23prodtm Feb 1, 2026
7633541
x86_64 pushed ./deployment/images/mysqldb
b23prodtm Feb 1, 2026
0c851db
x86_64 pushed ./balena-storage
b23prodtm Feb 1, 2026
217ef9a
aarch64 pushed ./deployment/images/httpd
b23prodtm Feb 1, 2026
dedbf85
aarch64 pushed ./deployment/images/mysqldb
b23prodtm Feb 1, 2026
19866dc
aarch64 pushed ./balena-storage
b23prodtm Feb 1, 2026
5694184
Updated Templates
b23prodtm Feb 1, 2026
b1e12d1
armhf pushed ./deployment/images/httpd
b23prodtm Feb 1, 2026
e5c657a
armhf pushed ./deployment/images/mysqldb
b23prodtm Feb 1, 2026
adf637f
armhf pushed ./balena-storage
b23prodtm Feb 1, 2026
ef36ca6
x86_64 pushed ./deployment/images/httpd
b23prodtm Feb 1, 2026
cf48d6a
x86_64 pushed ./deployment/images/mysqldb
b23prodtm Feb 1, 2026
ff47098
x86_64 pushed ./balena-storage
b23prodtm Feb 1, 2026
37318d6
aarch64 pushed ./deployment/images/httpd
b23prodtm Feb 1, 2026
5bd9fc4
aarch64 pushed ./deployment/images/mysqldb
b23prodtm Feb 1, 2026
09f78d4
aarch64 pushed ./balena-storage
b23prodtm Feb 1, 2026
d6e93da
Updated Templates
b23prodtm Feb 1, 2026
f48cec8
build templates
b23prodtm Feb 1, 2026
c9e836b
Merge remote-tracking branch 'refs/remotes/origin/fix/compose' into f…
b23prodtm Feb 1, 2026
7901217
armhf pushed ./deployment/images/httpd
b23prodtm Feb 1, 2026
6002622
armhf pushed ./deployment/images/mysqldb
b23prodtm Feb 1, 2026
07ab4a5
armhf pushed ./balena-storage
b23prodtm Feb 1, 2026
63e0509
armhf pushed ./deployment/images/httpd
b23prodtm Feb 1, 2026
15b1a89
armhf pushed ./deployment/images/httpd
b23prodtm Feb 1, 2026
11580de
armhf pushed ./deployment/images/httpd
b23prodtm Feb 1, 2026
55029b3
armhf pushed ./deployment/images/httpd
b23prodtm Feb 1, 2026
1c9a1dd
armhf pushed ./deployment/images/mysqldb
b23prodtm Feb 1, 2026
5209368
armhf pushed ./balena-storage
b23prodtm Feb 1, 2026
d2f6a70
x86_64 pushed ./deployment/images/httpd
b23prodtm Feb 1, 2026
e812d2a
x86_64 pushed ./deployment/images/mysqldb
b23prodtm Feb 1, 2026
7f41db4
x86_64 pushed ./balena-storage
b23prodtm Feb 1, 2026
f96d33f
aarch64 pushed ./deployment/images/httpd
b23prodtm Feb 1, 2026
4af5665
aarch64 pushed ./deployment/images/mysqldb
b23prodtm Feb 1, 2026
c847735
aarch64 pushed ./balena-storage
b23prodtm Feb 1, 2026
dc65ee0
Updated Templates
b23prodtm Feb 1, 2026
1655dc7
armhf pushed ./deployment/images/httpd
b23prodtm Feb 1, 2026
0b1da1e
armhf pushed ./deployment/images/mysqldb
b23prodtm Feb 1, 2026
b3608ee
armhf pushed ./balena-storage
b23prodtm Feb 1, 2026
3c4a5ac
x86_64 pushed ./deployment/images/httpd
b23prodtm Feb 1, 2026
d860227
x86_64 pushed ./deployment/images/mysqldb
b23prodtm Feb 1, 2026
6d03520
x86_64 pushed ./balena-storage
b23prodtm Feb 1, 2026
c87f3d2
aarch64 pushed ./deployment/images/httpd
b23prodtm Feb 1, 2026
70d54ff
aarch64 pushed ./deployment/images/mysqldb
b23prodtm Feb 1, 2026
a81f236
aarch64 pushed ./balena-storage
b23prodtm Feb 1, 2026
e67b2db
Updated Templates
b23prodtm Feb 1, 2026
ef017a5
armhf pushed ./deployment/images/httpd
b23prodtm Feb 1, 2026
7da3e90
armhf pushed ./deployment/images/mysqldb
b23prodtm Feb 1, 2026
81735d4
armhf pushed ./balena-storage
b23prodtm Feb 1, 2026
c057a90
Update BUILD.md
b23prodtm Feb 1, 2026
802c197
Update deploy.sh
b23prodtm Feb 1, 2026
5c88cbf
Rename initdb.sh to init-db.sh
b23prodtm Feb 1, 2026
88f4bc2
Fix TOPDIR assignment in build script
b23prodtm Feb 1, 2026
ac6bf4a
Fix TOPDIR variable assignment syntax
b23prodtm Feb 1, 2026
a030534
Fix TOPDIR variable assignment in build.template
b23prodtm Feb 1, 2026
3c7fe17
Fix TOPDIR variable assignment syntax
b23prodtm Feb 1, 2026
8508c18
Update init-db.sh
b23prodtm Feb 1, 2026
5539e31
armhf pushed ./deployment/images/httpd
Feb 1, 2026
1b128df
armhf pushed ./deployment/images/mysqldb
Feb 1, 2026
91b6074
armhf pushed ./balena-storage
Feb 1, 2026
4a84b01
x86_64 pushed ./deployment/images/httpd
Feb 1, 2026
5aa4fb2
x86_64 pushed ./deployment/images/mysqldb
Feb 1, 2026
8fe8566
x86_64 pushed ./balena-storage
Feb 1, 2026
99ac279
aarch64 pushed ./deployment/images/httpd
Feb 1, 2026
2f91888
aarch64 pushed ./deployment/images/mysqldb
Feb 1, 2026
735838b
aarch64 pushed ./balena-storage
Feb 1, 2026
bec6e12
Updated Templates
Feb 1, 2026
930eb01
hcl
Feb 1, 2026
2e53cb2
fix yarn
Feb 1, 2026
c46bf8c
action
Feb 1, 2026
5eb5286
selfhosted
Feb 1, 2026
9367a4a
remote
Feb 1, 2026
d631105
Update config.yml
b23prodtm Feb 1, 2026
15c33d0
armhf pushed ./deployment/images/httpd
Feb 2, 2026
a6ac27a
armhf pushed ./deployment/images/mysqldb
Feb 2, 2026
09afc2c
armhf pushed ./balena-storage
Feb 2, 2026
5372b61
x86_64 pushed ./deployment/images/httpd
Feb 2, 2026
0ce6ca1
x86_64 pushed ./deployment/images/mysqldb
Feb 2, 2026
915e88e
x86_64 pushed ./balena-storage
Feb 2, 2026
49905da
aarch64 pushed ./deployment/images/httpd
Feb 2, 2026
6b63bf8
aarch64 pushed ./deployment/images/mysqldb
Feb 2, 2026
89c8cc9
aarch64 pushed ./balena-storage
Feb 2, 2026
1e90eaa
Updated Templates
Feb 2, 2026
d7d3039
armhf pushed ./deployment/images/httpd
Feb 2, 2026
6b277c4
armhf pushed ./deployment/images/mysqldb
Feb 2, 2026
dd1860c
armhf pushed ./balena-storage
Feb 2, 2026
a307f40
x86_64 pushed ./deployment/images/httpd
Feb 2, 2026
bb1e44d
x86_64 pushed ./deployment/images/mysqldb
Feb 2, 2026
67126f0
x86_64 pushed ./balena-storage
Feb 2, 2026
6e66d67
aarch64 pushed ./deployment/images/httpd
Feb 2, 2026
69e88ad
aarch64 pushed ./deployment/images/mysqldb
Feb 2, 2026
27897af
aarch64 pushed ./balena-storage
Feb 2, 2026
e7cba25
Updated Templates
Feb 2, 2026
7715630
armhf pushed ./deployment/images/httpd
Feb 2, 2026
d6ee01f
armhf pushed ./deployment/images/mysqldb
Feb 2, 2026
b745e42
armhf pushed ./balena-storage
Feb 2, 2026
8227a63
Deployment was updated
Feb 2, 2026
6e28704
armhf pushed ./deployment/images/httpd
Feb 2, 2026
efb02e6
armhf pushed ./balena-storage
Feb 2, 2026
3eeb089
x86_64 pushed ./deployment/images/httpd
Feb 2, 2026
bfe079d
x86_64 pushed ./deployment/images/mysqldb
Feb 2, 2026
98bd1fd
x86_64 pushed ./balena-storage
Feb 2, 2026
cce0399
aarch64 pushed ./deployment/images/httpd
Feb 2, 2026
6baf13e
aarch64 pushed ./deployment/images/mysqldb
Feb 2, 2026
c294e6a
aarch64 pushed ./balena-storage
Feb 2, 2026
f3f077a
Updated Templates
Feb 2, 2026
faf93a1
armhf pushed ./deployment/images/httpd
Feb 2, 2026
fa99775
armhf pushed ./deployment/images/mysqldb
Feb 2, 2026
cf749d3
armhf pushed ./balena-storage
Feb 2, 2026
93957be
Deployment was updated
Feb 2, 2026
85dddeb
armhf pushed ./deployment/images/httpd
Feb 2, 2026
2771a5a
armhf pushed ./deployment/images/mysqldb
Feb 2, 2026
0bef538
x86_64 pushed ./deployment/images/httpd
Feb 2, 2026
a369f84
x86_64 pushed ./deployment/images/mysqldb
Feb 2, 2026
adb8451
x86_64 pushed ./balena-storage
Feb 2, 2026
f166eaa
aarch64 pushed ./deployment/images/httpd
Feb 2, 2026
71b5be4
aarch64 pushed ./deployment/images/mysqldb
Feb 2, 2026
839e0b2
aarch64 pushed ./balena-storage
Feb 2, 2026
5feb345
Updated Templates
Feb 2, 2026
cadf4c8
armhf pushed ./deployment/images/httpd
Feb 2, 2026
dfe21af
armhf pushed ./deployment/images/mysqldb
Feb 2, 2026
284499c
armhf pushed ./balena-storage
Feb 2, 2026
d2c9eda
Deployment was updated
Feb 2, 2026
9c185e4
armhf pushed ./deployment/images/httpd
Feb 2, 2026
6967265
armhf pushed ./balena-storage
Feb 2, 2026
581425b
x86_64 pushed ./deployment/images/httpd
Feb 2, 2026
63bb3bf
x86_64 pushed ./deployment/images/mysqldb
Feb 2, 2026
c5bd97a
x86_64 pushed ./balena-storage
Feb 2, 2026
67debca
aarch64 pushed ./deployment/images/httpd
Feb 2, 2026
a3f5e07
aarch64 pushed ./deployment/images/mysqldb
Feb 2, 2026
f7f50a3
aarch64 pushed ./balena-storage
Feb 2, 2026
5269515
Updated Templates
Feb 2, 2026
bbd83d0
armhf pushed ./deployment/images/httpd
Feb 2, 2026
0f503aa
armhf pushed ./deployment/images/mysqldb
Feb 2, 2026
37eee4f
armhf pushed ./balena-storage
Feb 2, 2026
44b9c6f
Deployment was updated
Feb 2, 2026
f17c1de
Update Dockerfile.template
b23prodtm Feb 2, 2026
c481792
Update Dockerfile.template
b23prodtm Feb 2, 2026
9db4b72
armhf pushed ./deployment/images/httpd
Feb 2, 2026
4e56223
armhf pushed ./balena-storage
Feb 2, 2026
316d8c7
x86_64 pushed ./deployment/images/httpd
Feb 2, 2026
87c4988
x86_64 pushed ./deployment/images/mysqldb
Feb 2, 2026
3386787
x86_64 pushed ./balena-storage
Feb 2, 2026
4838d0f
aarch64 pushed ./deployment/images/httpd
Feb 2, 2026
b6a98bf
aarch64 pushed ./deployment/images/mysqldb
Feb 2, 2026
764b5e1
aarch64 pushed ./balena-storage
Feb 2, 2026
ba59d55
Updated Templates
Feb 2, 2026
1279567
armhf pushed ./deployment/images/httpd
Feb 2, 2026
59bfef8
armhf pushed ./deployment/images/mysqldb
Feb 2, 2026
277468d
armhf pushed ./balena-storage
Feb 2, 2026
226be54
Deployment was updated
Feb 2, 2026
21cd6ed
armhf pushed ./deployment/images/httpd
Feb 2, 2026
ddb64d5
x86_64 pushed ./deployment/images/httpd
Feb 2, 2026
0802ea1
x86_64 pushed ./deployment/images/mysqldb
Feb 2, 2026
d1389ac
x86_64 pushed ./balena-storage
Feb 2, 2026
90a47ee
aarch64 pushed ./deployment/images/httpd
Feb 2, 2026
1d28bff
aarch64 pushed ./deployment/images/mysqldb
Feb 2, 2026
21fb8db
aarch64 pushed ./balena-storage
Feb 2, 2026
0148451
Updated Templates
Feb 2, 2026
df0c65b
armhf pushed ./deployment/images/httpd
Feb 2, 2026
e945dbf
armhf pushed ./deployment/images/mysqldb
Feb 2, 2026
9b7f7f6
armhf pushed ./balena-storage
Feb 2, 2026
23f7ec1
Deployment was updated
Feb 2, 2026
397cf78
Updated Templates
Feb 2, 2026
5ee17b9
armhf pushed ./deployment/images/httpd
Feb 2, 2026
ebf9c4c
x86_64 pushed ./deployment/images/httpd
Feb 2, 2026
febf81f
x86_64 pushed ./deployment/images/mysqldb
Feb 2, 2026
428b77f
x86_64 pushed ./balena-storage
Feb 2, 2026
5224ef6
aarch64 pushed ./deployment/images/httpd
Feb 2, 2026
5758dca
aarch64 pushed ./deployment/images/mysqldb
Feb 2, 2026
6445777
aarch64 pushed ./balena-storage
Feb 2, 2026
cca849d
Updated Templates
Feb 2, 2026
b2eea07
armhf pushed ./deployment/images/httpd
Feb 2, 2026
e8b58e9
armhf pushed ./deployment/images/mysqldb
Feb 2, 2026
96a4c15
armhf pushed ./balena-storage
Feb 2, 2026
6aa64ef
Deployment was updated
Feb 2, 2026
e9ff0f0
yarn modules
Feb 2, 2026
b8685ad
armhf pushed ./deployment/images/httpd
Feb 2, 2026
ce04996
armhf pushed ./balena-storage
Feb 2, 2026
2b70b24
x86_64 pushed ./deployment/images/httpd
Feb 2, 2026
4ea8f52
x86_64 pushed ./deployment/images/mysqldb
Feb 2, 2026
3be8e7b
x86_64 pushed ./balena-storage
Feb 2, 2026
996a2fd
aarch64 pushed ./deployment/images/httpd
Feb 2, 2026
a19b0e2
aarch64 pushed ./deployment/images/mysqldb
Feb 2, 2026
ac10e29
aarch64 pushed ./balena-storage
Feb 2, 2026
191e98e
Updated Templates
Feb 2, 2026
aa3bb67
armhf pushed ./deployment/images/httpd
Feb 2, 2026
71438af
armhf pushed ./deployment/images/mysqldb
Feb 2, 2026
552fa2a
armhf pushed ./balena-storage
Feb 2, 2026
7436f2e
Deployment was updated
Feb 2, 2026
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
295 changes: 188 additions & 107 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: 2.1

orbs:
shellcheck: circleci/shellcheck@1.3.16
shellcheck: circleci/shellcheck@3.2.0

executors:
docker-executor:
Expand All @@ -10,156 +10,237 @@ executors:
resource_class: medium

commands:
build-multiarch:
parameters:
image:
type: string
workdir:
type: string
setup-buildx:
steps:
- run:
name: Install Docker Buildx
command: |
mkdir -p ~/.docker/cli-plugins
BUILDX_VERSION=v0.12.1
wget -q "https://github.com/docker/buildx/releases/download/${BUILDX_VERSION}/buildx-${BUILDX_VERSION}.linux-amd64" \
-O ~/.docker/cli-plugins/docker-buildx
chmod +x ~/.docker/cli-plugins/docker-buildx
docker buildx version

- run:
name: Create buildx builder
command: |
docker buildx create --name multiarch --driver docker-container --use --bootstrap
docker buildx inspect multiarch

set-build-tag:
description: "Set BUILD_TAG environment variable based on branch or tag"
steps:
- run:
name: Set build tag
command: |
if [ -n "${CIRCLE_TAG}" ]; then
TAG="${CIRCLE_TAG}"
else
TAG="${CIRCLE_BRANCH}-${CIRCLE_SHA1:0:7}"
fi
# lowercase
TAG=$(echo "$TAG" | tr '[:upper:]' '[:lower:]')
# replace invalid chars with '-'
echo "export BUILD_TAG=$(echo "$TAG" | sed 's/[^a-z0-9._-]/-/g')" >> $BASH_ENV
source $BASH_ENV
echo "Build tag: ${BUILD_TAG}"

jobs:
shellcheck:
docker:
- image: koalaman/shellcheck-alpine:stable
steps:
- checkout
- run:
name: Run shellcheck
command: |
find . -type f -name "*.sh" -exec shellcheck --exclude=SC2154,SC1091,SC2034,SC2096,SC2038 {} +

build-x86_64:
executor: docker-executor
steps:
- checkout
- setup_remote_docker:
version: 20.10.18
version: docker24
docker_layer_caching: true

- run:
name: Enable QEMU for multi-arch
command: |
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- setup-buildx
- set-build-tag

- run:
name: Login to Docker Hub
command: |
echo "$DOCKER_PASS" | docker login -u "$DOCKER_USER" --password-stdin

- run:
name: Build amd64
name: Build and push x86_64
command: |
cd << parameters.workdir >>
docker build \
--platform linux/amd64 \
-t "$DOCKER_USER/<< parameters.image >>:${CIRCLE_TAG}-x86_64" \
-f Dockerfile.x86_64 .
docker push "$DOCKER_USER/<< parameters.image >>:${CIRCLE_TAG}-x86_64"
export DOCKER_ORG=${DOCKER_USER}
export BAKE_TAG=${BUILD_TAG}
export BALENA_ARCH=x86_64
export PLATFORM=linux/amd64

echo "Building ${DOCKER_ORG}/*:${BAKE_TAG} for ${PLATFORM}"
cp -vf "docker-compose.${BALENA_ARCH}" docker-compose.yml
docker buildx bake -f docker-bake.hcl \
--set "*.platform=${PLATFORM}" \
--push

- run:
name: Build arm64
name: Tag images with architecture suffix
command: |
cd << parameters.workdir >>
docker build \
--platform linux/arm64 \
-t "$DOCKER_USER/<< parameters.image >>:${CIRCLE_TAG}-aarch64" \
-f Dockerfile.aarch64 .
docker push "$DOCKER_USER/<< parameters.image >>:${CIRCLE_TAG}-aarch64"
for service in mysqldb php-fpm httpd balena-storage; do
docker buildx imagetools create \
--tag ${DOCKER_USER}/${service}:${BUILD_TAG}-x86_64 \
${DOCKER_USER}/${service}:${BUILD_TAG}
done

build-aarch64:
executor: docker-executor
steps:
- checkout
- setup_remote_docker:
version: docker24
docker_layer_caching: true

- setup-buildx
- set-build-tag

- run:
name: Build armhf
name: Login to Docker Hub
command: |
cd << parameters.workdir >>
docker build \
--platform linux/arm/v7 \
-t "$DOCKER_USER/<< parameters.image >>:${CIRCLE_TAG}-armhf" \
-f Dockerfile.armhf .
docker push "$DOCKER_USER/<< parameters.image >>:${CIRCLE_TAG}-armhf"
echo "$DOCKER_PASS" | docker login -u "$DOCKER_USER" --password-stdin

- run:
name: Create multi-arch manifest
name: Build and push aarch64
command: |
docker manifest create "$DOCKER_USER/<< parameters.image >>:${CIRCLE_TAG}" \
"$DOCKER_USER/<< parameters.image >>:${CIRCLE_TAG}-x86_64" \
"$DOCKER_USER/<< parameters.image >>:${CIRCLE_TAG}-aarch64" \
"$DOCKER_USER/<< parameters.image >>:${CIRCLE_TAG}-armhf"

docker manifest push "$DOCKER_USER/<< parameters.image >>:${CIRCLE_TAG}"
export DOCKER_ORG=${DOCKER_USER}
export BAKE_TAG=${BUILD_TAG}
export BALENA_ARCH=aarch64
export PLATFORM=linux/arm64

echo "Building ${DOCKER_ORG}/*:${BAKE_TAG} for ${PLATFORM}"
cp -vf "docker-compose.${BALENA_ARCH}" docker-compose.yml
docker buildx bake -f docker-bake.hcl \
--set "*.platform=${PLATFORM}" \
--push

- run:
name: Tag images with architecture suffix
command: |
for service in mysqldb php-fpm httpd balena-storage; do
docker buildx imagetools create \
--tag ${DOCKER_USER}/${service}:${BUILD_TAG}-aarch64 \
${DOCKER_USER}/${service}:${BUILD_TAG}
done

jobs:
httpd:
build-armhf:
executor: docker-executor
steps:
- build-multiarch:
image: httpd
workdir: deployment/images/httpd
- checkout
- setup_remote_docker:
version: docker24
docker_layer_caching: true

mysql:
executor: docker-executor
steps:
- build-multiarch:
image: mysql
workdir: deployment/images/mysql
- setup-buildx
- set-build-tag

php-fpm:
executor: docker-executor
steps:
- build-multiarch:
image: php-fpm
workdir: deployment/images/php-fpm
- run:
name: Login to Docker Hub
command: |
echo "$DOCKER_PASS" | docker login -u "$DOCKER_USER" --password-stdin

- run:
name: Build and push armhf
command: |
export DOCKER_ORG=${DOCKER_USER}
export BAKE_TAG=${BUILD_TAG}
export BALENA_ARCH=armhf
export PLATFORM=linux/arm/v7

echo "Building ${DOCKER_ORG}/*:${BAKE_TAG} for ${PLATFORM}"
cp -vf "docker-compose.${BALENA_ARCH}" docker-compose.yml
docker buildx bake -f docker-bake.hcl \
--set "*.platform=${PLATFORM}" \
--push

- run:
name: Tag images with architecture suffix
command: |
for service in mysqldb php-fpm httpd balena-storage; do
docker buildx imagetools create \
--tag ${DOCKER_USER}/${service}:${BUILD_TAG}-armhf \
${DOCKER_USER}/${service}:${BUILD_TAG}
done

build-and-compose:
create-manifests:
executor: docker-executor
steps:
- checkout
- setup_remote_docker:
version: 20.10.18
docker_layer_caching: true
version: docker24

- set-build-tag

- run:
name: Login to Docker Hub
command: |
echo "$DOCKER_PASS" | docker login -u "$DOCKER_USER" --password-stdin

- run:
name: Deploy with docker compose
name: Create and push multi-arch manifests
command: |
cd deployment
docker compose pull
docker compose up -d
for service in mysqldb php-fpm httpd balena-storage; do
echo "Creating manifest for ${service}:${BUILD_TAG}"

# Create multi-arch manifest
docker manifest create ${DOCKER_USER}/${service}:${BUILD_TAG} \
${DOCKER_USER}/${service}:${BUILD_TAG}-x86_64 \
${DOCKER_USER}/${service}:${BUILD_TAG}-aarch64 \
${DOCKER_USER}/${service}:${BUILD_TAG}-armhf

docker manifest push ${DOCKER_USER}/${service}:${BUILD_TAG}

# Also create/update latest tag for main branch
if [ "${CIRCLE_BRANCH}" = "main" ] || [ "${CIRCLE_BRANCH}" = "master" ]; then
echo "Updating latest tag for ${service}"
docker manifest create ${DOCKER_USER}/${service}:latest \
${DOCKER_USER}/${service}:${BUILD_TAG}-x86_64 \
${DOCKER_USER}/${service}:${BUILD_TAG}-aarch64 \
${DOCKER_USER}/${service}:${BUILD_TAG}-armhf

docker manifest push ${DOCKER_USER}/${service}:latest
fi
done

- run:
name: Verify manifests
command: |
for service in mysqldb php-fpm httpd balena-storage; do
echo "Verifying ${service}:${BUILD_TAG}"
docker manifest inspect ${DOCKER_USER}/${service}:${BUILD_TAG}
done

workflows:
version: 2
build:
build-all-branches:
jobs:
- shellcheck/check:
ignore: 'SC2154,SC1091,SC2034,SC2096,SC2038'
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/

- httpd:
- shellcheck

- build-x86_64:
requires:
- shellcheck/check
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/

- mysql:
- shellcheck

- build-aarch64:
requires:
- shellcheck/check
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/

- php-fpm:
- shellcheck

- build-armhf:
requires:
- shellcheck/check
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/

- build-and-compose:
- shellcheck

- create-manifests:
requires:
- httpd
- mysql
- php-fpm
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/
- build-x86_64
- build-aarch64
- build-armhf
2 changes: 1 addition & 1 deletion .env
Loading
Loading