Skip to content

Commit 1a4ed66

Browse files
authored
add images for generators (#81)
1 parent d82398d commit 1a4ed66

File tree

6 files changed

+39
-1
lines changed

6 files changed

+39
-1
lines changed

.github/workflows/build-images-on-commit.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ on:
77
- "src/loaders/**"
88
- "src/services/**"
99
- "src/databases/**"
10+
- "scripts/docker-compose/**"
11+
- "scripts/k8s/**"
1012
- ".github/workflows/reusable-build-container-images.yml"
1113
- ".github/workflows/build-images-on-commit.yml"
1214
workflow_dispatch:

.github/workflows/build-images-on-pr.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ on:
66
- "src/loaders/**"
77
- "src/services/**"
88
- "src/databases/**"
9+
- "scripts/docker-compose/**"
10+
- "scripts/k8s/**"
911
- ".github/workflows/reusable-build-container-images.yml"
1012
- ".github/workflows/check.yml"
1113

.github/workflows/reusable-build-container-images.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ jobs:
3131
name: services-nodejs
3232
- context: ./src/databases/mysql
3333
name: databases-mysql
34+
- context: ./scripts/docker-compose
35+
name: generators-docker-compose
36+
- context: ./scripts/k8s
37+
name: generators-k8s
3438
steps:
3539
- name: Checkout
3640
uses: actions/[email protected]

scripts/build.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,12 @@ for DIR in "${REPO_DIR}/src/loaders"/*; do
7373
docker buildx build --platform "$PLATFORM" -t "$IMAGE_TAG" $PUSH "$DIR" $PUSH
7474
fi
7575
done
76+
77+
for DIR in "${REPO_DIR}/scripts/generators"/*; do
78+
if [ -d "$DIR" ]; then
79+
IMAGE_TAG="${REPO_PREFIX}/${IMAGE_PREFIX}-generators-$(basename "$DIR"):$VERSION"
80+
echo "Building $IMAGE_TAG..."
81+
echo "Running 'docker buildx build --platform $PLATFORM -t $IMAGE_TAG $DIR $PUSH'"
82+
docker buildx build --platform "$PLATFORM" -t "$IMAGE_TAG" $PUSH "$DIR" $PUSH
83+
fi
84+
done

scripts/generators/docker-compose/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.14-alpine
1+
FROM python:3.13-alpine
22

33
WORKDIR /app
44

scripts/generators/k8s/Dockerfile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
FROM python:3.13-alpine
2+
3+
WORKDIR /app
4+
5+
RUN apk addgroup -S appgroup && adduser -S appuser -G appgroup
6+
7+
COPY requirements.txt .
8+
RUN pip install --no-cache-dir -r requirements.txt
9+
10+
COPY createManifests.py .
11+
12+
COPY templates ./templates
13+
COPY deployments ./deployments
14+
15+
RUN chown -R appuser:appgroup /app && chmod +x createManifests.py
16+
USER appuser
17+
18+
VOLUME [ "/app/deployments" ]
19+
20+
# Define the default entrypoint to run the script
21+
ENTRYPOINT ["python", "createManifests.py"]

0 commit comments

Comments
 (0)