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

settings.yml doesn't work #1196

Closed
sun2ot opened this issue May 11, 2024 · 7 comments
Closed

settings.yml doesn't work #1196

sun2ot opened this issue May 11, 2024 · 7 comments

Comments

@sun2ot
Copy link

sun2ot commented May 11, 2024

system:
  defaultLocale: 'zh-CN'

I made a settings.yml in /deploy/stirling-pdf/configs/, and the above is the content of it. The docker-compose.yaml like this:

version: '3.3'
services:
  stirling-pdf:
    image: frooodle/s-pdf:latest
    ports:
      - '8080:8080'
    volumes:
      - /location/of/trainingData:/deploy/stirling-pdf/tessdata #Required for extra OCR languages
      - /location/of/extraConfigs:/deploy/stirling-pdf/configs
      - /location/of/logs:/deploy/stirling-pdf/logs
    environment:
      - DOCKER_ENABLE_SECURITY=false
      - INSTALL_BOOK_AND_ADVANCED_HTML_OPS=false

Everything is ok with running docker compose up -d but the default language showed is not zh-CN.

And I tried to set the configuation in the docker-compose.yaml like this:

    environment:
      - DOCKER_ENABLE_SECURITY=false
      - INSTALL_BOOK_AND_ADVANCED_HTML_OPS=false
      # this is from the wiki: https://stirlingtools.com/docs/Advanced%20Configuration/Other%20Customisations#defaulting-language
      - APP_LOCALE=zh-CN

Unfortunately, it still did not work as expected.

I hope these above can help you understand my doubts. Looking forward to your reply.

@sun2ot
Copy link
Author

sun2ot commented May 11, 2024

Not only the system settings, but also the ui settings...

ui:
  appName: Some Chinese words with out single quotation mark

@Frooodle
Copy link
Member

What settings do you see printing in your logs on startup
Also what version are you running
A tag or alpha/develop or..

@sun2ot
Copy link
Author

sun2ot commented May 11, 2024

What settings do you see printing in your logs on startup Also what version are you running A tag or alpha/develop or..

well... image: frooodle/s-pdf:latest the stable latest? The log is here:

stirling-pdf-1  | Copying original files without overwriting existing files
stirling-pdf-1  | Running Stirling PDF with DOCKER_ENABLE_SECURITY=false and VERSION_TAG=0.23.1
stirling-pdf-1  | Setting permissions and ownership for necessary directories...
stirling-pdf-1  | Picked up JAVA_TOOL_OPTIONS:  -XX:MaxRAMPercentage=75
stirling-pdf-1  |  ____ _____ ___ ____  _     ___ _   _  ____       ____  ____  _____
stirling-pdf-1  | / ___|_   _|_ _|  _ \| |   |_ _| \ | |/ ___|     |  _ \|  _ \|  ___|
stirling-pdf-1  | \___ \ | |  | || |_) | |    | ||  \| | |  _ _____| |_) | | | | |_
stirling-pdf-1  |  ___) || |  | ||  _ <| |___ | || |\  | |_| |_____|  __/| |_| |  _|
stirling-pdf-1  | |____/ |_| |___|_| \_\_____|___|_| \_|\____|     |_|   |____/|_|
stirling-pdf-1  | Powered by Spring Boot 3.2.4
stirling-pdf-1  | 12:35:45.008 [main] INFO  s.software.SPDF.SPdfApplication - Starting SPdfApplication v0.23.1 using Java 17.0.11 with PID 10 (/app.jar started by stirlingpdfuser in /)
stirling-pdf-1  | 12:35:45.013 [main] INFO  s.software.SPDF.SPdfApplication - No active profile set, falling back to 1 default profile: "default"
stirling-pdf-1  | 12:35:46.674 [main] INFO  o.s.b.w.e.tomcat.TomcatWebServer - Tomcat initialized with port 8080 (http)
stirling-pdf-1  | 12:35:46.683 [main] INFO  o.a.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8080"]
stirling-pdf-1  | 12:35:46.685 [main] INFO  o.a.catalina.core.StandardService - Starting service [Tomcat]
stirling-pdf-1  | 12:35:46.686 [main] INFO  o.a.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/10.1.19]
stirling-pdf-1  | 12:35:46.724 [main] INFO  o.a.c.c.C.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext
stirling-pdf-1  | 12:35:46.725 [main] INFO  o.s.b.w.s.c.ServletWebServerApplicationContext - Root WebApplicationContext: initialization completed in 1602 ms
stirling-pdf-1  | 12:35:46.946 [main] INFO  s.software.SPDF.SPdfApplication - Running configs ApplicationProperties [security=Security [enableLogin=false, initialLogin=null,  csrfDisabled=true], system=System [defaultLocale=en-US, googlevisibility=false, rootURIPath=null, customStaticFilePath=null, maxFileSize=null, enableAlphaFunctionality=false, showUpdate=true, showUpdateOnlyAdmin=false], ui=null, endpoints=Endpoints [toRemove=[], groupsToRemove=[]], metrics=Metrics [enabled=true], automaticallyGenerated=null, autoPipeline=null]
stirling-pdf-1  | 12:35:46.966 [main] INFO  s.s.S.config.EndpointConfiguration - Disabling pdf-to-book
stirling-pdf-1  | 12:35:46.967 [main] INFO  s.s.S.config.EndpointConfiguration - Disabling book-to-pdf
stirling-pdf-1  | 12:35:47.963 [main] INFO  o.s.b.a.e.web.EndpointLinksResolver - Exposing 1 endpoint(s) beneath base path '/actuator'
stirling-pdf-1  | 12:35:48.007 [main] INFO  o.a.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8080"]
stirling-pdf-1  | 12:35:48.025 [main] INFO  o.s.b.w.e.tomcat.TomcatWebServer - Tomcat started on port 8080 (http) with context path ''
stirling-pdf-1  | 12:35:48.049 [main] INFO  s.software.SPDF.SPdfApplication - Started SPdfApplication in 3.69 seconds (process running for 4.407)
stirling-pdf-1  | 12:35:49.100 [main] INFO  s.software.SPDF.SPdfApplication - Stirling-PDF Started.
stirling-pdf-1  | 12:35:49.101 [main] INFO  s.software.SPDF.SPdfApplication - Navigate to http://localhost:8080
stirling-pdf-1  | 12:35:49.538 [http-nio-8080-exec-1] INFO  o.a.c.c.C.[Tomcat].[localhost].[/] - Initializing Spring DispatcherServlet 'dispatcherServlet'
stirling-pdf-1  | 12:35:49.539 [http-nio-8080-exec-1] INFO  o.s.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet'
stirling-pdf-1  | 12:35:49.540 [http-nio-8080-exec-1] INFO  o.s.web.servlet.DispatcherServlet - Completed initialization in 1 ms

@Frooodle
Copy link
Member

You are changing the wrong path in your compose

The container path should remain same and you should change your systems to whatever you want in the above example you changed the containers path

@Frooodle
Copy link
Member

Also please follow GitHub not website (for app locale side)
Website is out of date at moment sorry

@Frooodle
Copy link
Member

version: '3.3'
services:
  stirling-pdf:
    image: frooodle/s-pdf:latest
    ports:
      - '8080:8080'
    volumes:
      - /location/of/trainingData:/usr/share/tessdata #Required for extra OCR languages
      - /location/of/extraConfigs:/configs
     

in this example /configs has to remain same and cant be changed, this is the hard coded path inside the docker that app is looking at
/location/of/extraConfigs: is custom to your location, i presume /deploy/stirling-pdf/configs

@sun2ot
Copy link
Author

sun2ot commented May 11, 2024

Thank you very much for your help! My problem has been solved.

@sun2ot sun2ot closed this as completed May 11, 2024
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

No branches or pull requests

2 participants