Changing the Deployment Domain
When deploying RepoFlow, the default configuration is set to run on localhost
. For production deployments, you must configure your desired custom domain for both the server and client environments.
This guide outlines the required changes in the server and client Helm configurations.
Environment Variables
Changes in the Server Environment Variables
In the server Helm configuration, update the following environment variables:
1. FRONTEND_URL
- Description: This should be set to the full URL of the frontend as seen by users.
- Example:
https://my-repoflow.com
2. SERVER_URL
- Description: This should be set to the full URL of the server's API, accessible from the user's perspective.
- Example:
https://my-repoflow.com/api
3. COOKIE_DOMAIN
- Description: This should be set to the shared domain of the server and frontend.
- Example:
my-repoflow.com
4. COOKIE_SECURE
- Description: This determines whether cookies should only be sent over secure HTTPS connections. Set this to
true
if your domain uses HTTPS. - Example:
false
forhttp://my-repoflow.com
true
forhttps://my-repoflow.com
Changes in the Client Environment Variables
In the client Helm configuration, update the following environment
variables:
1. window.COOKIE_DOMAIN
- Description: Set this to the domain shared by both the server and frontend. Replace
"localhost"
with your domain. - Example:
window.COOKIE_DOMAIN = "my-repoflow.com";
2. window.IS_CONNECTION_SECURE
- Description: Set this to
true
if your domain uses HTTPS. This ensures the connection is marked as secure. - Example:
window.IS_CONNECTION_SECURE = true; // for HTTPS
Updating the Helm Chart
To customize your deployment, first, download the default values.yaml
file. This file contains all the configurable options for the Helm chart and allows you to override the default values used during installation.
Step 1: Get a Copy of values.yaml
Download the values.yaml
file from the RepoFlow Helm Chart Repository:
helm show values repoflow-helm-public/repoflow > values.yaml
This will save the default configuration to a file named values.yaml
in your current directory.
Step 2: Modify the values.yaml
File
Open the values.yaml
file and update the server and client configurations as needed.
Server Configuration Example
Update only the environment variables you need to change:
server:
environment:
# Change only those in the server env
FRONTEND_URL: "https://my-repoflow.com"
SERVER_URL: "https://my-repoflow.com/api"
COOKIE_DOMAIN: "my-repoflow.com"
COOKIE_SECURE: "true"
# Don't delete the rest of the environment variables
Client Configuration Example
client:
environment: |
window.HASURA_API_URL = "/hasura";
window.IS_CONNECTION_SECURE = true; # Update this one if needed
window.REPOFLOW_SERVER = "/api";
window.COOKIE_DOMAIN = "my-repoflow.com"; # Update this
window.IS_PRINT_ENV = true; // for debugging
window.DOCS_URL = "/docs";
Step 3: Add an ingress (Optional)
Update the ingress section in your values.yaml
file by setting enabled to true
and configuring the host
with your domain name, as shown below:
ingress:
enabled: true
annotations:
kubernetes.io/ingress.class: "nginx"
nginx.ingress.kubernetes.io/use-regex: "true"
nginx.ingress.kubernetes.io/proxy-body-size: "1g"
# Disable request buffering to stream request body to the backend
nginx.ingress.kubernetes.io/proxy-request-buffering: "off"
# Optionally, disable response buffering as well (although this applies to responses from the server)
nginx.ingress.kubernetes.io/proxy-buffering: "off"
className:
useIngressClassName: false
ingressClassName: ""
tls:
isTlsEnabled: false
hosts:
- secretName: your-domain.com-tls
hosts:
- your-domain.com
hosts:
- host: your-domain.com
paths:
- path: /
pathType: Prefix
backend:
service:
name: repoflow-nginx-service
port:
number: 8080
Step 4: Apply the Changes
Once you’ve updated values.yaml
, use the following command to apply your changes:
helm upgrade repoflow repoflow-helm-public/repoflow -f values.yaml
With these updates, your RepoFlow instance will now use your custom domain and the appropriate secure settings.