Forceu / barcodebuddy

Barcode system for Grocy
GNU Affero General Public License v3.0
442 stars 59 forks source link

BBUDDY_EXTERNAL_GROCY_URL not working properly #230

Open Teslamancer opened 10 months ago

Teslamancer commented 10 months ago

I have Barcode Buddy running in a k3s home cluster and am trying to set the external url so that the header link will work properly. As specified in the documentation, I have set the environment variable BBUDDY_EXTERNAL_GROCY_URL to my external URL "https://example.website.us/" I have also set BBUDDY_OVERRIDDEN_USER_CONFIG to use the internal k8s service for grocy, with a value like "GROCY_API_URL=http://grocy:8080/api/;GROCY_API_KEY=$(GROCY_API_KEY)" and that seems to be working properly, but the external URL in the header is set to "http://grocy:8080" despite the external url config. My helm chart is as below:

`apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "grocy.fullname" . }}-barcode-buddy namespace: {{ .Release.Namespace }} labels: app: barcode-buddy spec: selector: matchLabels: app: barcode-buddy template: metadata: labels: app: barcode-buddy spec: containers:

Teslamancer commented 8 months ago

@Forceu Is there something wrong with my configuration, or is there a bug in the code?

disconn3ct commented 1 month ago

"Same here"

The override config works and directs it to http://grocy/api but the external URL is not used. The grocy link (and 'create product' etc) all lead to the internal address.

image: f0rc3/barcodebuddy:v1.8.1.8
env:                                                                                                                                                                              
  - name: BBUDDY_DISABLE_AUTHENTICATION                                                                                                                                             
    value: "true"
  - name: BBUDDY_EXTERNAL_GROCY_URL   
    value: https://grocy.EXAMPLE.COM/
  - name: BBUDDY_OVERRIDDEN_USER_CONFIG
    # BBUDDY_OVERRIDDEN_USER_CONFIG="GROCY_API_URL=http://grocy/api/;GROCY_API_KEY=foo" 
    valueFrom:
      secretKeyRef:
        key: config
        name: barcodeconfig
  - name: BBUDDY_TRUSTED_PROXIES
    value: 10.0.0.0/8
  - name: PGID
    value: "1000"
  - name: PUID
    value: "1000"
  - name: TZ
    value: America/New_York