Skip to content

Commit b24ecf9

Browse files
committed
chore(repo): fix local docker dev
1 parent 841388e commit b24ecf9

31 files changed

Lines changed: 1786 additions & 704 deletions

.github/workflows/build-branch.yml

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,9 @@ jobs:
148148
docker-image-owner: makeplane
149149
docker-image-name: ${{ needs.branch_build_setup.outputs.dh_img_admin }}
150150
build-context: .
151-
dockerfile-path: ./apps/admin/Dockerfile.admin
151+
dockerfile-path: ./Dockerfile.node
152+
build-args: |
153+
APP_SCOPE=admin
152154
buildx-driver: ${{ needs.branch_build_setup.outputs.gh_buildx_driver }}
153155
buildx-version: ${{ needs.branch_build_setup.outputs.gh_buildx_version }}
154156
buildx-platforms: ${{ needs.branch_build_setup.outputs.gh_buildx_platforms }}
@@ -170,7 +172,9 @@ jobs:
170172
docker-image-owner: makeplane
171173
docker-image-name: ${{ needs.branch_build_setup.outputs.dh_img_web }}
172174
build-context: .
173-
dockerfile-path: ./apps/web/Dockerfile.web
175+
dockerfile-path: ./Dockerfile.node
176+
build-args: |
177+
APP_SCOPE=web
174178
buildx-driver: ${{ needs.branch_build_setup.outputs.gh_buildx_driver }}
175179
buildx-version: ${{ needs.branch_build_setup.outputs.gh_buildx_version }}
176180
buildx-platforms: ${{ needs.branch_build_setup.outputs.gh_buildx_platforms }}
@@ -192,7 +196,9 @@ jobs:
192196
docker-image-owner: makeplane
193197
docker-image-name: ${{ needs.branch_build_setup.outputs.dh_img_space }}
194198
build-context: .
195-
dockerfile-path: ./apps/space/Dockerfile.space
199+
dockerfile-path: ./Dockerfile.node
200+
build-args: |
201+
APP_SCOPE=space
196202
buildx-driver: ${{ needs.branch_build_setup.outputs.gh_buildx_driver }}
197203
buildx-version: ${{ needs.branch_build_setup.outputs.gh_buildx_version }}
198204
buildx-platforms: ${{ needs.branch_build_setup.outputs.gh_buildx_platforms }}
@@ -235,8 +241,8 @@ jobs:
235241
dockerhub-token: ${{ secrets.DOCKERHUB_TOKEN }}
236242
docker-image-owner: makeplane
237243
docker-image-name: ${{ needs.branch_build_setup.outputs.dh_img_backend }}
238-
build-context: ./apps/api
239-
dockerfile-path: ./apps/api/Dockerfile.api
244+
build-context: .
245+
dockerfile-path: ./Dockerfile.api
240246
buildx-driver: ${{ needs.branch_build_setup.outputs.gh_buildx_driver }}
241247
buildx-version: ${{ needs.branch_build_setup.outputs.gh_buildx_version }}
242248
buildx-platforms: ${{ needs.branch_build_setup.outputs.gh_buildx_platforms }}
@@ -268,14 +274,15 @@ jobs:
268274
if: ${{ needs.branch_build_setup.outputs.aio_build == 'true' }}
269275
name: Build-Push AIO Docker Image
270276
runs-on: ubuntu-22.04
271-
needs: [
277+
needs:
278+
[
272279
branch_build_setup,
273280
branch_build_push_admin,
274281
branch_build_push_web,
275282
branch_build_push_space,
276283
branch_build_push_live,
277284
branch_build_push_api,
278-
branch_build_push_proxy
285+
branch_build_push_proxy,
279286
]
280287
steps:
281288
- name: Checkout Files
@@ -285,7 +292,7 @@ jobs:
285292
id: prepare_aio_assets
286293
run: |
287294
cd deployments/aio/community
288-
295+
289296
if [ "${{ needs.branch_build_setup.outputs.build_type }}" == "Release" ]; then
290297
aio_version=${{ needs.branch_build_setup.outputs.release_version }}
291298
else
@@ -324,7 +331,16 @@ jobs:
324331
upload_build_assets:
325332
name: Upload Build Assets
326333
runs-on: ubuntu-22.04
327-
needs: [branch_build_setup, branch_build_push_admin, branch_build_push_web, branch_build_push_space, branch_build_push_live, branch_build_push_api, branch_build_push_proxy]
334+
needs:
335+
[
336+
branch_build_setup,
337+
branch_build_push_admin,
338+
branch_build_push_web,
339+
branch_build_push_space,
340+
branch_build_push_live,
341+
branch_build_push_api,
342+
branch_build_push_proxy,
343+
]
328344
steps:
329345
- name: Checkout Files
330346
uses: actions/checkout@v4
@@ -397,4 +413,3 @@ jobs:
397413
${{ github.workspace }}/deployments/cli/community/docker-compose.yml
398414
${{ github.workspace }}/deployments/cli/community/variables.env
399415
${{ github.workspace }}/deployments/swarm/community/swarm.sh
400-

.github/workflows/build-images.yml

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
name: Build and Push Images (Bake)
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
tag:
7+
description: "Tag to apply to all images (e.g., latest, v1.2.3)"
8+
type: string
9+
required: true
10+
default: "latest"
11+
image_prefix:
12+
description: "Registry/repo prefix for images (e.g., makeplane/ or ghcr.io/owner/)"
13+
type: string
14+
required: true
15+
default: "makeplane/"
16+
platforms:
17+
description: "Comma-separated target platforms"
18+
type: string
19+
required: true
20+
default: "linux/amd64"
21+
include_aio:
22+
description: "Also build the all-in-one image"
23+
type: boolean
24+
required: true
25+
default: true
26+
push:
27+
description: "Push images to registry"
28+
type: boolean
29+
required: true
30+
default: false
31+
32+
permissions:
33+
contents: read
34+
packages: write
35+
36+
env:
37+
DOCKER_BUILDKIT: "1"
38+
39+
jobs:
40+
build:
41+
name: Build (and optionally push) all images via buildx bake
42+
runs-on: ubuntu-latest
43+
44+
steps:
45+
- name: Checkout repository
46+
uses: actions/checkout@v4
47+
with:
48+
fetch-depth: 0
49+
50+
- name: Show inputs
51+
run: |
52+
echo "TAG=${{ inputs.tag }}"
53+
echo "IMAGE_PREFIX=${{ inputs.image_prefix }}"
54+
echo "PLATFORMS=${{ inputs.platforms }}"
55+
echo "INCLUDE_AIO=${{ inputs.include_aio }}"
56+
echo "PUSH=${{ inputs.push }}"
57+
58+
- name: Set bake group based on include_aio
59+
run: |
60+
if [ "${{ inputs.include_aio }}" = "true" ]; then
61+
echo "BAKE_GROUP=all" >> $GITHUB_ENV
62+
else
63+
echo "BAKE_GROUP=default" >> $GITHUB_ENV
64+
fi
65+
66+
- name: Set up QEMU (for multi-arch)
67+
if: contains(inputs.platforms, 'linux/arm64')
68+
uses: docker/setup-qemu-action@v3
69+
70+
- name: Set up Docker Buildx
71+
uses: docker/setup-buildx-action@v3
72+
with:
73+
driver: docker-container
74+
75+
- name: Log in to Docker Hub (optional)
76+
if: inputs.push && env.DOCKERHUB_USERNAME != '' && env.DOCKERHUB_TOKEN != ''
77+
env:
78+
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
79+
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
80+
uses: docker/login-action@v3
81+
with:
82+
username: ${{ env.DOCKERHUB_USERNAME }}
83+
password: ${{ env.DOCKERHUB_TOKEN }}
84+
85+
- name: Log in to GHCR (optional)
86+
if: inputs.push && env.GHCR_TOKEN != ''
87+
env:
88+
GHCR_TOKEN: ${{ secrets.GHCR_TOKEN }}
89+
uses: docker/login-action@v3
90+
with:
91+
registry: ghcr.io
92+
username: ${{ github.actor }}
93+
password: ${{ env.GHCR_TOKEN }}
94+
95+
- name: Build (no push)
96+
if: ${{ inputs.push == false }}
97+
run: |
98+
docker buildx bake -f plane/docker-bake.hcl "${BAKE_GROUP}" \
99+
--progress=plain \
100+
--set TAG="${{ inputs.tag }}" \
101+
--set IMAGE_PREFIX="${{ inputs.image_prefix }}" \
102+
--set PLATFORMS="${{ inputs.platforms }}"
103+
104+
- name: Build and Push
105+
if: ${{ inputs.push == true }}
106+
run: |
107+
docker buildx bake -f plane/docker-bake.hcl "${BAKE_GROUP}" \
108+
--progress=plain \
109+
--push \
110+
--set TAG="${{ inputs.tag }}" \
111+
--set IMAGE_PREFIX="${{ inputs.image_prefix }}" \
112+
--set PLATFORMS="${{ inputs.platforms }}"

0 commit comments

Comments
 (0)