Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to correctly pass docker environment variables #333

Closed
dannykorpan opened this issue Aug 31, 2023 · 15 comments
Closed

How to correctly pass docker environment variables #333

dannykorpan opened this issue Aug 31, 2023 · 15 comments
Labels
question Further information is requested

Comments

@dannykorpan
Copy link

Hi,

how do I correctly pass environment variables for e.g. the default language in a docker compose file?
Here is my docker compose, but the language is still English and not German. What is wrong here?

version: '3.3'
services:
    s-pdf:
      restart: always
      container_name: pdftools
      labels:
        - "com.centurylinklabs.watchtower.enable=true"
      image: frooodle/s-pdf
      volumes:
        - /opt/docker/pdftools/tessdata:/usr/share/tesseract-ocr/4.00/tessdata
      networks:
        - default
      environment:
        - defaultLocale="de-DE"
        - googlevisibility="false"

networks:
  default:
    name: www
    external: true

Thank you for any help in advance
Danny

@dannykorpan dannykorpan changed the title How to correctly pass docker environment variables How to correctly pass docker environment variables for docker Aug 31, 2023
@dannykorpan dannykorpan changed the title How to correctly pass docker environment variables for docker How to correctly pass docker environment variables Aug 31, 2023
@Frooodle
Copy link
Member

This recently got changed in the v0.13.0 update onwards
please follow
https://github.com/Frooodle/Stirling-PDF#customisation
for instructions
ie instead of defaultLocale
it should be
SYSTEM_DEFAULTLOCALE

@Frooodle
Copy link
Member

Let me know if that works fine

@Frooodle Frooodle added the question Further information is requested label Aug 31, 2023
@kerberjc
Copy link

It doesn't seem to work for SYSTEM_ROOTPATH... I have tried "pdf", "/pdf" "/pdf/" and "https://fulldomain/pdf"

@Frooodle
Copy link
Member

Ahh I see issue
Sorry the migration of properties has been more awkward than I thought
I will fix this in next patch

@Frooodle
Copy link
Member

Can you try SYSTEM_ROOTURIPATH ?

@2004gixxer600
Copy link

Also having issues. I can't seem to get the right settings with the newest version. Lost the ability to custom brand etc. Tried a variety of things, will wait till updates to the documentation etc.

@kerberjc
Copy link

kerberjc commented Sep 1, 2023

Can you try SYSTEM_ROOTURIPATH ?

Was able to get that to work with "/pdf"

@NRL-LEastham
Copy link

I've just done a new install and even the config file seems to be ignored at the moment. Neither my docker environment or the settings file options are being used. This is on the latest docker image.

@Frooodle
Copy link
Member

Frooodle commented Sep 2, 2023

Also having issues. I can't seem to get the right settings with the newest version. Lost the ability to custom brand etc. Tried a variety of things, will wait till updates to the documentation etc.

I have already updated documentation on this
image
If you want to change the app name etc via env variables then you can use

UI_APPNAME
UI_HOMEDESCRIPTION
etc

@Frooodle
Copy link
Member

Frooodle commented Sep 2, 2023

I've just done a new install and even the config file seems to be ignored at the moment. Neither my docker environment or the settings file options are being used. This is on the latest docker image.

Cant reproduce this, case you raise as a new issue and ill see if i can reproduce, are you using security mode?

@2004gixxer600
Copy link

Got it. All set, I misinterpreted the new instructions. thanks!

@Frooodle
Copy link
Member

Frooodle commented Sep 2, 2023

Any way i could word it better?

@2004gixxer600
Copy link

Maybe have a docker-compose example file with all the environment variable options spelled out with # and users can just remove the comment and use the ones they need?

@NRL-LEastham
Copy link

I've just done a new install and even the config file seems to be ignored at the moment. Neither my docker environment or the settings file options are being used. This is on the latest docker image.

Cant reproduce this, case you raise as a new issue and ill see if i can reproduce, are you using security mode?

I've rebuilt it today and removed the env variables from the docker compose. It's now picking up the settings from the config file. Thanks.

@Frooodle Frooodle closed this as completed Sep 4, 2023
@B0F1B0
Copy link

B0F1B0 commented Sep 29, 2023

Maybe have a docker-compose example file with all the environment variable options spelled out with # and users can just remove the comment and use the ones they need?

 environment:
      - DOCKER_ENABLE_SECURITY=true
      - SECURITY_ENABLELOGIN=true     #Default username: admin and password: stirling 
      - SYSTEM_DEFAULTLOCALE=de-DE
      - SYSTEM_GOOGLEVISIBILITY=false
      - UI_APPNAMENAVBAR=appnamenavbar-test
      - UI_APPNAME=DOCKER PDF
      - UI_HOMEDESCRIPTION=------> AWESOME PDF TOOL IN DOCKER <------
      - METRICS_ENABLED=false # API CAllS are not allowed e.g. http://<IP>:<PORT>/api/v1/uptime
      #- ENDPOINTS_TOREMOVE=img-to-pdf, remove-pages

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

6 participants