Skip to content

Commit 186d4bd

Browse files
committed
dynamic Postgres-Port; First version of build.yml to publish a docker-image to ghcr
1 parent 9503172 commit 186d4bd

File tree

6 files changed

+93
-20
lines changed

6 files changed

+93
-20
lines changed

.github/workflows/build.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: Build (ProcessCube.AppTemplate → GHCR)
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
7+
permissions:
8+
contents: read
9+
packages: write
10+
11+
env:
12+
CI_TOOLS_VERSION: '^5.0.0'
13+
IMAGE_NAME: lowcode_apptemplate
14+
15+
jobs:
16+
get_version:
17+
name: Prepare Version
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v4
21+
with:
22+
fetch-depth: 0
23+
24+
- name: Use Node.js 22.x
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: 22.x
28+
registry-url: 'https://registry.npmjs.org'
29+
30+
- name: Install CI Tools
31+
run: npm i -g @5minds/product_ci_tools@${{ env.CI_TOOLS_VERSION }}
32+
33+
- name: Prepare Version Infos
34+
id: get_version
35+
run: |
36+
ci_tools prepare-version --allow-dirty-workdir
37+
echo "VERSION=$(ci_tools get-version)" >> $GITHUB_OUTPUT
38+
39+
outputs:
40+
VERSION: ${{ steps.get_version.outputs.VERSION }}
41+
42+
build_and_push_synology:
43+
name: Build & Push Synology Image (GHCR)
44+
runs-on: ubuntu-latest
45+
needs: [get_version]
46+
47+
steps:
48+
- uses: actions/checkout@v4
49+
with:
50+
fetch-depth: 0
51+
52+
- name: Set up Docker Buildx
53+
uses: docker/setup-buildx-action@v3
54+
55+
# Variante B: PAT mit SSO+read:packages (wenn Package in anderer Orga)
56+
- name: Login to GHCR (PAT)
57+
uses: docker/login-action@v3
58+
with:
59+
registry: ghcr.io
60+
username: ${{ secrets.GH_USER }}
61+
password: ${{ secrets.GH_TOKEN }} # PAT mit read:packages (und SSO enabled)
62+
63+
- name: Build & Push (linux/amd64 for Synology)
64+
uses: docker/build-push-action@v6
65+
with:
66+
context: apps/lowcode
67+
push: true
68+
platforms: linux/amd64
69+
build-args: |
70+
NPM_TOKEN=${{ secrets.NPM_TOKEN }}
71+
tags: |
72+
ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:latest
73+
ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ needs.get_version.outputs.VERSION }}

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ Das Template zeigt folgende Konzepte:
99
- **Custom-Plugin**: `apps/lowcode/src/nodes/aplugin/*`
1010
- **Custom-Node-RED-Node**: `apps/lowcode/src/nodes/sample_node/*`
1111
- **UI-Node für das Dashboard-2**:
12-
- `apps/lowcode/src/nodes/ui-hello.js` / `apps/lowcode/src/nodes/ui-hello.html`
13-
- `apps/lowcode/src/nodes/ui-termo.js` / `apps/lowcode/src/nodes/ui-termo.html`
12+
- `/apps/lowcode/src/nodes/ui-hello.js` / `/apps/lowcode/src/nodes/ui-hello.html`
13+
- `/apps/lowcode/src/nodes/ui-termo.js` / `/apps/lowcode/src/nodes/ui-termo.html`
1414

1515
und die Vue.js-Dateien für die UI-Komponenten:
16-
- `apps/lowcode/src/ui/componentes/ui-hello.vue`
17-
- `apps/lowcode/src/ui/componentes/ui-termo.vue`
16+
- `/apps/lowcode/src/ui/componentes/ui-hello.vue`
17+
- `/apps/lowcode/src/ui/componentes/ui-termo.vue`
1818

1919
WICHITG: Das Paket für die UI-Widgets muss mit dem Package-Name `node-red-dashboard-2-` beginnen und im nodesDir der Node-RED-Installation (`RED.settings...userDir`) liegen, damit es korrekt geladen wird.
2020

@@ -53,7 +53,7 @@ Der zugehörige Prozess mit External Task in der Engine:
5353

5454
- **ProcessCube Engine** mit PostgreSQL-Anbindung
5555
- **ProcessCube Authority**
56-
- **PostgreSQL** mit Initialisierungsskript
56+
- **PostgreSQL** mit Initialisierungsskript und dynamischem externen Port-Mapping
5757

5858
## Roadmap
5959

apps/lowcode/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ghcr.io/5minds/processcube_lowcode:7.5.0-alpha.6
1+
FROM ghcr.io/5minds/processcube_lowcode:7.5.0-alpha.7
22

33
# Root Benutzer für die Installation von Systempaketen
44
USER root

apps/lowcode/data/flowStorageDir/flows/hello_node_samples_a85e87983529d6b3/group_beispiel_ui-widgets_578b664c8ba7fc2e.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
"label": true
88
},
99
"nodes": [
10-
"727c7264c10d7384",
1110
"fd2864eaf04c6fb0",
11+
"727c7264c10d7384",
1212
"d81e596cef1d84c7"
1313
]
1414
}

apps/lowcode/data/flowStorageDir/flows/hello_node_samples_a85e87983529d6b3/positions.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,20 @@
66
"w": 692,
77
"h": 222
88
},
9-
{
10-
"nodeId": "93c4c6793a67f021",
11-
"x": 44,
12-
"y": 19,
13-
"w": 622,
14-
"h": 202
15-
},
169
{
1710
"nodeId": "578b664c8ba7fc2e",
1811
"x": 54,
1912
"y": 499,
2013
"w": 412,
2114
"h": 142
2215
},
16+
{
17+
"nodeId": "93c4c6793a67f021",
18+
"x": 44,
19+
"y": 19,
20+
"w": 622,
21+
"h": 202
22+
},
2323
{
2424
"nodeId": "f6bf6b4f8df1eb7b",
2525
"x": 360,
@@ -35,6 +35,11 @@
3535
"x": 150,
3636
"y": 280
3737
},
38+
{
39+
"nodeId": "fd2864eaf04c6fb0",
40+
"x": 360,
41+
"y": 540
42+
},
3843
{
3944
"nodeId": "79ba1e5c41f5028d",
4045
"x": 540,
@@ -90,11 +95,6 @@
9095
"x": 140,
9196
"y": 540
9297
},
93-
{
94-
"nodeId": "fd2864eaf04c6fb0",
95-
"x": 360,
96-
"y": 540
97-
},
9898
{
9999
"nodeId": "d81e596cef1d84c7",
100100
"x": 140,

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ services:
4949
volumes:
5050
- ./postgres/apptemplate_db.instance:/data/postgres
5151
ports:
52-
- 5432:5432
52+
- 5432 # Dynamic external port mapping
5353
healthcheck:
5454
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres}"]
5555
interval: 5s

0 commit comments

Comments
 (0)