9 Commits
Author SHA1 Message Date
ahp c4c9f37bbc release: pull private Gitea packages via gitea-pull secret (ns pargar)
build-and-push / build (push) Successful in 29s
2026-10-18 22:14:50 +03:30
ahp a1c429782f release: pin Argo images to 0.3.7 (cutover tag)
build-and-push / build (push) Successful in 31s
2026-10-18 21:57:01 +03:30
ahp 0dcc7bbf76 ci: prebaked job image + fix buildx discovery under DOCKER_CONFIG
download.docker.com resets intermittently from the cluster network, and
/root/.docker/cli-plugins is not searched when the workflow sets
DOCKER_CONFIG=/tmp/.docker ('Docker buildx is required').

- jobs on the apollo runner use act-job:20 (.gitea/job-image: node 20 +
  docker CLI + buildx in system plugin paths) - no runtime downloads
- other runners fall back to installing, now into a system plugin path
2026-10-18 21:57:01 +03:30
ahp 77748bcba2 ci: authenticate registry with REGISTRY_TOKEN secret
build-and-push / build (push) Canceled after 55s
Use an explicit Gitea token (write:package scope) instead of the
built-in job token for docker login.
2026-10-18 19:17:14 +03:30
ahp 994879749b ci: install docker CLI in job container + shared DOCKER_CONFIG
The job runs in node:20-bookworm which ships no docker binary
(run 21 died with 'Unable to locate executable file: docker').
Install static docker client + buildx, and fail fast with an
actionable error if the runner has not mounted the docker socket.
2026-10-18 19:14:01 +03:30
ahp 41e40c9ab2 release: v0.3.6 gitops cutover
build-and-push / build (push) Failing after 16s
- ci: run build jobs on the runner's default linux-amd64 label
- deploy: pin apollo images to 0.3.6 (built+pushed by CI on this tag)

Same app code as v0.3.5; first release deployed via Gitea Actions
(build) + Argo CD (rollout) instead of manual build/import/helm.
2026-10-18 18:54:17 +03:30
ahp 42871c51cd Merge branch 'main' of https://src.panahifar.ir/ahp/pargar 2026-10-18 16:29:00 +03:30
ahp 6dc04de222 ci: gitea actions build/push + argocd registry repoint 2026-10-18 16:27:58 +03:30
ahp 265fb8dde4 docs(readme): prune outdated section
remove github section
2026-10-18 12:19:52 +03:30
5 changed files with 119 additions and 11 deletions
+14
View File
@@ -0,0 +1,14 @@
# CI job image for the Gitea Actions runners.
#
# JS actions (actions/checkout, docker/build-push-action) execute INSIDE the
# job container and need node; builds talk to the runner's daemon through the
# mounted /var/run/docker.sock, so this image needs the docker CLI + buildx
# but no daemon. Baking them in means jobs never download binaries at runtime:
# download.docker.com and github.com releases are unreachable (connection
# reset) from the cluster's network.
#
# Tagged as src.panahifar.ir/ahp/act-job:20 (node 20 / bookworm).
FROM node:20-bookworm
COPY --from=docker:27-cli /usr/local/bin/docker /usr/local/bin/docker
COPY --from=docker:27-cli /usr/local/libexec/docker/cli-plugins/docker-buildx /usr/local/libexec/docker/cli-plugins/docker-buildx
+90
View File
@@ -0,0 +1,90 @@
name: build-and-push
# On a version tag push (v*), build both images and publish them to the
# Gitea container registry. Argo CD then rolls them out via
# deploy/helm/pargar (values-apollo.yaml pins the matching image tags).
#
# Requires a registered Gitea Actions runner, a `REGISTRY_TOKEN` secret
# (Gitea access token with write:package scope) so docker login can push to
# the registry.
on:
push:
tags:
- "v*"
permissions:
contents: read
packages: write
env:
REGISTRY: src.panahifar.ir
BACKEND_IMAGE: ahp/pargar-backend
FRONTEND_IMAGE: ahp/pargar-frontend
# Single credential location shared by login + build steps (the job runs
# in a container whose HOME can differ between steps).
DOCKER_CONFIG: /tmp/.docker
jobs:
build:
# Gitea runners match on their registered labels (default: linux-amd64)
runs-on: linux-amd64
steps:
- uses: actions/checkout@v4
- name: Image tag (strip leading v)
id: meta
run: echo "version=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"
# Builds run docker-outside-of-docker through the runner-mounted
# /var/run/docker.sock. The apollo runner's job image (act-job:20,
# .gitea/job-image) already ships the docker CLI + buildx in system
# plugin paths; runners on other networks fall back to installing them
# at runtime (needs access to download.docker.com + github.com, and the
# plugin must land where docker looks with DOCKER_CONFIG set).
- name: Set up Docker CLI (preinstalled on apollo; install elsewhere)
run: |
set -eu
if [ ! -S /var/run/docker.sock ]; then
echo "::error::/var/run/docker.sock is not mounted in the job container - the act_runner config must mount it (docker_host: \"\" auto-mounts it)."
exit 1
fi
if ! command -v docker >/dev/null 2>&1 || ! docker buildx version >/dev/null 2>&1; then
curl -fsSL "https://download.docker.com/linux/static/stable/x86_64/docker-27.5.1.tgz" | tar xz --strip-components=1 -C /usr/local/bin docker/docker
mkdir -p /root/.docker/cli-plugins /usr/local/libexec/docker/cli-plugins
curl -fsSL "https://github.com/docker/buildx/releases/download/v0.19.3/buildx-v0.19.3.linux-amd64" -o /root/.docker/cli-plugins/docker-buildx
cp /root/.docker/cli-plugins/docker-buildx /usr/local/libexec/docker/cli-plugins/docker-buildx
chmod +x /root/.docker/cli-plugins/docker-buildx /usr/local/libexec/docker/cli-plugins/docker-buildx
fi
docker version
docker buildx version
- name: Login to Gitea container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Build and push backend
uses: docker/build-push-action@v6
with:
context: ./backend
push: true
tags: |
${{ env.REGISTRY }}/${{ env.BACKEND_IMAGE }}:${{ steps.meta.outputs.version }}
${{ env.REGISTRY }}/${{ env.BACKEND_IMAGE }}:latest
- name: Build and push frontend
uses: docker/build-push-action@v6
with:
context: ./frontend
push: true
# Empty = same-origin API/WS through the Traefik reverse proxy
# (the production topology). Override via repo variables if needed.
build-args: |
NEXT_PUBLIC_API_URL=${{ vars.NEXT_PUBLIC_API_URL }}
NEXT_PUBLIC_WS_URL=${{ vars.NEXT_PUBLIC_WS_URL }}
tags: |
${{ env.REGISTRY }}/${{ env.FRONTEND_IMAGE }}:${{ steps.meta.outputs.version }}
${{ env.REGISTRY }}/${{ env.FRONTEND_IMAGE }}:latest
-1
View File
@@ -10,7 +10,6 @@
</p> </p>
<p align="center"> <p align="center">
<a href="https://github.com/Panahifarah/pargar/releases/tag/v0.2.1"><img src="https://img.shields.io/github/v/tag/Panahifarah/pargar?label=release&color=5B4CDB" alt="release" /></a>
<a href="LICENSE"><img src="https://img.shields.io/badge/license-AGPL--3.0-5B4CDB" alt="AGPL-3.0" /></a> <a href="LICENSE"><img src="https://img.shields.io/badge/license-AGPL--3.0-5B4CDB" alt="AGPL-3.0" /></a>
</p> </p>
+8 -4
View File
@@ -11,7 +11,7 @@ backend:
image: image:
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
repository: pargar-backend repository: pargar-backend
tag: 0.2.1 tag: 0.3.7
metrics: metrics:
serviceMonitor: serviceMonitor:
enabled: true enabled: true
@@ -41,7 +41,7 @@ frontend:
image: image:
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
repository: pargar-frontend repository: pargar-frontend
tag: 0.2.1 tag: 0.3.7
podDisruptionBudget: podDisruptionBudget:
enabled: false enabled: false
replicaCount: 2 replicaCount: 2
@@ -55,9 +55,13 @@ frontend:
global: global:
domain: pargar.panahifar.ir domain: pargar.panahifar.ir
frontendOrigins: https://pargar.panahifar.ir frontendOrigins: https://pargar.panahifar.ir
imageRegistry: "" # Images published by .gitea/workflows/build-and-push.yaml on tag push.
imageRegistry: src.panahifar.ir/ahp
publicUrl: https://pargar.panahifar.ir publicUrl: https://pargar.panahifar.ir
imagePullSecrets: [] # Gitea packages are private: kubelet pulls need secret `gitea-pull`
# (docker-registry secret for src.panahifar.ir, created in ns pargar).
imagePullSecrets:
- gitea-pull
ingress: ingress:
enabled: true enabled: true
tls: tls:
+7 -6
View File
@@ -3,25 +3,26 @@
# -f deploy/helm/pargar/values-prod.yaml # -f deploy/helm/pargar/values-prod.yaml
# #
# Prerequisites: # Prerequisites:
# - images pushed to ghcr.io/pargar/{backend,frontend}:<tag> # - images pushed to src.panahifar.ir/ahp/{pargar-backend,pargar-frontend}:<tag>
# (by .gitea/workflows/build-and-push.yaml on a v* tag push)
# - Secret pargar-app (jwt-secret, admin-password, metrics-token, database-url, redis-url, # - Secret pargar-app (jwt-secret, admin-password, metrics-token, database-url, redis-url,
# storage-access-key, storage-secret-key) # storage-access-key, storage-secret-key)
# - cert-manager ClusterIssuer letsencrypt-prod # - cert-manager ClusterIssuer letsencrypt-prod
# - imagePullSecrets if the registry is private # - imagePullSecrets if the Gitea package registry visibility is private
global: global:
domain: app.example.com domain: app.example.com
publicUrl: https://app.example.com publicUrl: https://app.example.com
frontendOrigins: "https://app.example.com" frontendOrigins: "https://app.example.com"
imageRegistry: ghcr.io/pargar imageRegistry: src.panahifar.ir/ahp
imagePullSecrets: imagePullSecrets:
- name: ghcr-pull - name: gitea-pull
backend: backend:
replicaCount: 2 replicaCount: 2
image: image:
repository: backend repository: pargar-backend
tag: "0.2.1" tag: "0.2.1"
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
existingSecret: pargar-app existingSecret: pargar-app
@@ -48,7 +49,7 @@ backend:
frontend: frontend:
replicaCount: 2 replicaCount: 2
image: image:
repository: frontend repository: pargar-frontend
tag: "0.2.1" tag: "0.2.1"
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
resources: resources: