Skip to content

localhost paths seem hardcoded — impossible to run the app on a remote server #867

@GentleHoneyLover

Description

@GentleHoneyLover

Hi,

I'm running TNoodle-WCA-1.1.2.jar in a container (here's my image: link). It is basically a slight modification of the Dockerfile from your repo. When I deploy the container on localhost (my laptop) it runs just fine and generates scrambles correctly (Screenshot 1 below). However, when I run the same image on my home server (accessed via ip-address:port or through reverse-proxy), the app breaks (Screenshot 2 below). Presumably because localhost paths are hardcoded in the app.

Is that the case? Are there workarounds (like e. g. passing some arguments to java when starting the app)? Or, otherwise, can the app be updated to make all URL paths dynamic rather than static localhost?

Here's how the app starts from within the container:
java -server -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -XX:InitialRAMFraction=2 -XX:MinRAMFraction=2 -XX:MaxRAMFraction=2 -XX:+UseG1GC -XX:MaxGCPauseMillis=100 -XX:+UseStringDeduplication -jar tnoodle-application.jar --online

Screenshot 1 (localhost):

Screenshot 2023-11-15 at 10 39 22

Screenshot 2 (server):

Screenshot 2023-11-15 at 10 39 52

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions