Skip to content

feat: service deployments#1668

Merged
gaspergrom merged 5 commits intomainfrom
feat/service-deployments
Feb 12, 2026
Merged

feat: service deployments#1668
gaspergrom merged 5 commits intomainfrom
feat/service-deployments

Conversation

@gaspergrom
Copy link
Collaborator

No description provided.

Signed-off-by: Gašper Grom <gasper.grom@gmail.com>
@gaspergrom gaspergrom self-assigned this Feb 10, 2026
Copilot AI review requested due to automatic review settings February 10, 2026 13:41
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds deploy-time service selection so staging/production workflows can build/push and roll out different service images (frontend and Temporal workers) using a parameterized Docker build action.

Changes:

  • Add service input to staging/production deploy workflows and map it to dockerfile/image/deployment/container settings.
  • Generalize the build-docker-image composite action to accept dockerfile, image-name, and optional build-args.
  • Add a Dockerfile for the package_downloads_worker service (and a minor .dockerignore tweak).

Reviewed changes

Copilot reviewed 3 out of 5 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
workers/temporal/package_downloads_worker/Dockerfile Introduces a worker image build (multi-stage Node/pnpm install).
workers/temporal/package_downloads_worker/.dockerignore Minor ignore list formatting change (note: build context currently makes this ineffective).
.github/workflows/staging-deploy.yaml Adds service selector and deploys selected Kubernetes deployment/container.
.github/workflows/production-deploy.yaml Same as staging; also gates Redis flush to frontend only.
.github/actions/build-docker-image/action.yaml Makes Docker build/push reusable across services by parameterizing dockerfile/image name and build args.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

NUXT_REDIS_URL: ${{ env.NUXT_REDIS_URL }}
dockerfile: ${{ steps.config.outputs.dockerfile }}
image-name: ${{ steps.config.outputs.image_name }}
build-args: ${{ inputs.service == 'frontend' && format('NUXT_REDIS_URL={0}', env.NUXT_REDIS_URL) || '' }}
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NUXT_REDIS_URL is being passed into the Docker build as a build-arg. Since frontend/Dockerfile exports it as an ENV during the build, this value (often including credentials) can be baked into image layers/build output and be recoverable from the image. Prefer injecting Redis configuration at runtime (Kubernetes env/config) rather than at build time, or ensure the build does not persist secrets into the resulting image.

Suggested change
build-args: ${{ inputs.service == 'frontend' && format('NUXT_REDIS_URL={0}', env.NUXT_REDIS_URL) || '' }}
build-args: ''

Copilot uses AI. Check for mistakes.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

NUXT_REDIS_URL: ${{ env.NUXT_REDIS_URL }}
dockerfile: ${{ steps.config.outputs.dockerfile }}
image-name: ${{ steps.config.outputs.image_name }}
build-args: ${{ inputs.service == 'frontend' && format('NUXT_REDIS_URL={0}', env.NUXT_REDIS_URL) || '' }}
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NUXT_REDIS_URL is being passed into the Docker build as a build-arg. Since frontend/Dockerfile exports it as an ENV during the build, this value (often including credentials) can be baked into image layers/build output and be recoverable from the image. Prefer injecting Redis configuration at runtime (Kubernetes env/config) rather than at build time, or ensure the build does not persist secrets into the resulting image.

Suggested change
build-args: ${{ inputs.service == 'frontend' && format('NUXT_REDIS_URL={0}', env.NUXT_REDIS_URL) || '' }}
build-args: ''

Copilot uses AI. Check for mistakes.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one might be a security issue

Comment on lines +40 to +44
case "${{ inputs.service }}" in
frontend)
echo "dockerfile=frontend/Dockerfile" >> $GITHUB_OUTPUT
echo "image_name=insights-app" >> $GITHUB_OUTPUT
echo "k8s_deployment=insights-app-dpl" >> $GITHUB_OUTPUT
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The case over ${{ inputs.service }} has no default (*) branch. If this workflow is triggered with an unexpected value (e.g., via API), it will continue with empty outputs and fail later in a less obvious way. Consider adding a default branch that prints an error and exits non-zero.

Copilot uses AI. Check for mistakes.
Comment on lines +40 to +44
case "${{ inputs.service }}" in
frontend)
echo "dockerfile=frontend/Dockerfile" >> $GITHUB_OUTPUT
echo "image_name=insights-app" >> $GITHUB_OUTPUT
echo "k8s_deployment=insights-app-dpl" >> $GITHUB_OUTPUT
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The case over ${{ inputs.service }} has no default (*) branch. If this workflow is triggered with an unexpected value (e.g., via API), it will continue with empty outputs and fail later in a less obvious way. Consider adding a default branch that prints an error and exits non-zero.

Copilot uses AI. Check for mistakes.
Comment on lines 49 to 53
uses: docker/build-push-action@v6
with:
context: .
file: frontend/Dockerfile
file: ${{ inputs.dockerfile }}
push: true
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docker/build-push-action is invoked with context: ., which uses the repo-root .dockerignore. That .dockerignore currently excludes workers and submodules, but the worker Dockerfiles copy those paths, so builds for the worker services will fail with missing files. Consider updating the root .dockerignore to include these directories (or make the build context/dockerignore configurable per service) so worker builds have access to required sources.

Copilot uses AI. Check for mistakes.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if this is a valid comment, but might be worth checking out

Signed-off-by: Gašper Grom <gasper.grom@gmail.com>
Signed-off-by: Gašper Grom <gasper.grom@gmail.com>
Copy link
Collaborator

@emlimlf emlimlf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are copilot comments that might pose a security risk please check them out

Comment on lines 49 to 53
uses: docker/build-push-action@v6
with:
context: .
file: frontend/Dockerfile
file: ${{ inputs.dockerfile }}
push: true
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if this is a valid comment, but might be worth checking out

NUXT_REDIS_URL: ${{ env.NUXT_REDIS_URL }}
dockerfile: ${{ steps.config.outputs.dockerfile }}
image-name: ${{ steps.config.outputs.image_name }}
build-args: ${{ inputs.service == 'frontend' && format('NUXT_REDIS_URL={0}', env.NUXT_REDIS_URL) || '' }}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one might be a security issue

NUXT_REDIS_URL: ${{ env.NUXT_REDIS_URL }}
dockerfile: ${{ steps.config.outputs.dockerfile }}
image-name: ${{ steps.config.outputs.image_name }}
build-args: ${{ inputs.service == 'frontend' && format('NUXT_REDIS_URL={0}', env.NUXT_REDIS_URL) || '' }}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

Signed-off-by: Gašper Grom <gasper.grom@gmail.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 8 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (2)

workers/temporal/package_downloads_worker/Dockerfile:1

  • The builder stage is Node 24 but the runtime stage is Node 20. This can lead to runtime failures (e.g., dependency engines/ABI mismatches) since node_modules are installed under Node 24 and then copied into a Node 20 image. Align the Node major version between builder and runner (ideally parameterize via an ARG like the search-volume-worker Dockerfile).
    workers/temporal/package_downloads_worker/Dockerfile:18
  • The runtime stage uses node:20-bookworm-slim while the builder uses node:24-alpine. Copying node_modules built under a different Node major into this image is likely to break at runtime. Update this stage to use the same Node major as the builder (or revert builder to Node 20 if that’s the intended runtime).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@gaspergrom gaspergrom merged commit a9ca835 into main Feb 12, 2026
16 checks passed
@gaspergrom gaspergrom deleted the feat/service-deployments branch February 12, 2026 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants