Skip to content

Commit 6d77c20

Browse files
committed
fix: make Docker service label configurable for staging
The Kamal service label was hardcoded to 'kelas', causing staging deployment to fail. Now uses SERVICE_NAME build arg with 'kelas' as default, and staging workflow passes 'kelas-staging'.
1 parent ad7191d commit 6d77c20

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

.github/workflows/deploy-staging.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ jobs:
4747
tags: |
4848
ghcr.io/zainfathoni/kelas.rumahberbagi.com:staging-${{ github.sha }}
4949
ghcr.io/zainfathoni/kelas.rumahberbagi.com:staging-latest
50+
build-args: |
51+
SERVICE_NAME=kelas-staging
5052
cache-from: type=gha
5153
cache-to: type=gha,mode=max
5254
platforms: linux/amd64

Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,9 @@ EXPOSE 3000
7171
ENV NODE_ENV=production
7272
ENV PORT=3000
7373

74-
# Kamal requires service label
75-
LABEL service="kelas"
74+
# Kamal requires service label (configurable for staging)
75+
ARG SERVICE_NAME=kelas
76+
LABEL service="${SERVICE_NAME}"
7677

7778
# Start the application
7879
# Using explicit path for CJS compatibility with Node 24

0 commit comments

Comments
 (0)