fix(core): update dockerfiles and add build scripts for core modules
This commit is contained in:
parent
2c1543b488
commit
d304951767
4 changed files with 60 additions and 3 deletions
|
|
@ -37,8 +37,8 @@ ENV NODE_ENV=production
|
|||
|
||||
# Copy necessary files from build stages
|
||||
COPY --from=prod-deps /app/node_modules ./node_modules
|
||||
COPY --from=builder /app/dist ./dist
|
||||
COPY --from=builder /usr/src/app/dist ./dist
|
||||
# Copy prisma folder might be needed for migrations or schema references
|
||||
COPY --from=builder /app/prisma ./prisma
|
||||
COPY --from=builder /usr/src/app/prisma ./prisma
|
||||
|
||||
CMD ["dist/main.js"]
|
||||
|
|
|
|||
30
build_new_modules.sh
Normal file
30
build_new_modules.sh
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
REGISTRY="rg.fr-par.scw.cloud/yumi"
|
||||
MODULES=(
|
||||
"billing-finance-core"
|
||||
"crm-core"
|
||||
"repo-integrations-core"
|
||||
"observability-core"
|
||||
"platform-projects-core"
|
||||
"security-governance-core"
|
||||
"baas-control-plane"
|
||||
"automation-jobs-core"
|
||||
)
|
||||
|
||||
for module in "${MODULES[@]}"; do
|
||||
echo "🚀 Building $module..."
|
||||
|
||||
# Check if Dockerfile.api exists (for automation-jobs-core)
|
||||
if [ -f "./$module/Dockerfile.api" ]; then
|
||||
podman build -t "$REGISTRY/$module:latest" -f "./$module/Dockerfile.api" "./$module"
|
||||
else
|
||||
podman build -t "$REGISTRY/$module:latest" "./$module"
|
||||
fi
|
||||
|
||||
echo "🚀 Pushing $module..."
|
||||
podman push "$REGISTRY/$module:latest"
|
||||
echo "✅ $module done!"
|
||||
done
|
||||
|
||||
echo "🎉 All modules built and pushed!"
|
||||
27
fix_failed_builds.sh
Normal file
27
fix_failed_builds.sh
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
REGISTRY="rg.fr-par.scw.cloud/yumi"
|
||||
MODULES=(
|
||||
"platform-projects-core"
|
||||
"security-governance-core"
|
||||
"baas-control-plane"
|
||||
"automation-jobs-core"
|
||||
)
|
||||
|
||||
for module in "${MODULES[@]}"; do
|
||||
echo "🚀 Building $module..."
|
||||
|
||||
if [ "$module" == "automation-jobs-core" ]; then
|
||||
if [ -f "./$module/Dockerfile.api" ]; then
|
||||
podman build -t "$REGISTRY/$module:latest" -f "./$module/Dockerfile.api" "./$module"
|
||||
fi
|
||||
else
|
||||
podman build -t "$REGISTRY/$module:latest" "./$module"
|
||||
fi
|
||||
|
||||
echo "🚀 Pushing $module..."
|
||||
podman push "$REGISTRY/$module:latest"
|
||||
echo "✅ $module done!"
|
||||
done
|
||||
|
||||
echo "🎉 Failed modules fixed!"
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
FROM golang:1.22-alpine AS builder
|
||||
FROM docker.io/library/golang:1.22-alpine AS builder
|
||||
WORKDIR /app
|
||||
RUN apk add --no-cache git
|
||||
COPY go.mod go.sum ./
|
||||
|
|
|
|||
Loading…
Reference in a new issue