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

en var OTR_HTTPPREFIX not took into account #494

Closed
jeanmi151 opened this issue Sep 5, 2024 · 5 comments
Closed

en var OTR_HTTPPREFIX not took into account #494

jeanmi151 opened this issue Sep 5, 2024 · 5 comments

Comments

@jeanmi151
Copy link

Hey
while trying to help with this, #492
I remarked that OTR_HTTPPREFIX is not took into account when set.
I saw here that we can use environment variable ton configure few things : https://github.com/owntracks/recorder?tab=readme-ov-file#configuration-file
but we i try OTR_HTTPPREFIX I get 404 error every time.

To reproduce

# docker-compose.yaml
version: "3.6"
services:
  owntracks-recorder:
    container_name: owntracks-recorder
    image: owntracks/recorder
    ports:
      - 8083:8083
    environment:
      - OTR_PORT=0 # disables MQTT
      - OTR_HTTPPREFIX="/recorder/"
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - ./owntracks-recorder/config:/config
      - ./owntracks-recorder/store:/store
    restart: no

for OTR_HTTPPREFIX i tried :

see the log each time i see my var applied :

owntracks-recorder  | + Skipping open defaults file /config/recorder.conf: No such file or directory
owntracks-recorder  | + version 0.9.8 starting with STORAGEDIR=/store
owntracks-recorder  | + Not using MQTT: disabled by port=0
owntracks-recorder  | + HTTP listener started on 0.0.0.0:8083, without browser-apikey
owntracks-recorder  | + HTTP prefix is "http://localhost:8083/recorder/"
owntracks-recorder  | + Using storage at /store with precision 7
owntracks-recorder  | + TZDATADB is at /config/timezone16.bin: ENOENT
owntracks-recorder  | + http: GET /recorder/


owntracks-recorder  | + Skipping open defaults file /config/recorder.conf: No such file or directory
owntracks-recorder  | + version 0.9.8 starting with STORAGEDIR=/store
owntracks-recorder  | + Not using MQTT: disabled by port=0
owntracks-recorder  | + HTTP listener started on 0.0.0.0:8083, without browser-apikey
owntracks-recorder  | + HTTP prefix is "/recorder/"
owntracks-recorder  | + Using storage at /store with precision 7
owntracks-recorder  | + TZDATADB is at /config/timezone16.bin: ENOENT
owntracks-recorder  | + http: GET /recorder/
owntracks-recorder  | + http: GET /recorder/


owntracks-recorder  | + Skipping open defaults file /config/recorder.conf: No such file or directory
owntracks-recorder  | + version 0.9.8 starting with STORAGEDIR=/store
owntracks-recorder  | + Not using MQTT: disabled by port=0
owntracks-recorder  | + HTTP listener started on 0.0.0.0:8083, without browser-apikey
owntracks-recorder  | + HTTP prefix is /recorder/
owntracks-recorder  | + Using storage at /store with precision 7
owntracks-recorder  | + TZDATADB is at /config/timezone16.bin: ENOENT
owntracks-recorder  | + http: GET /recorder/

and I get 404 response for every try :

$ curl http://localhost:8083/recorder/
404 Not Found
 
@jpmens
Copy link
Member

jpmens commented Sep 5, 2024

The docs show that OTR_HTTPPREFIX is the prefix which is emitted by Recorder when we create tours, and its content should be a URL (e.g. https://example.com/recorder/) which points to a running Recorder.

@jpmens
Copy link
Member

jpmens commented Sep 5, 2024

Tours are documented in our Booklet.

@jeanmi151
Copy link
Author

okay so this OTR_HTTPPREFIX as nothing to do with the root of the website (path where it should answer) ?
So it is "normal" i get 404 if I request /recorder/ with the previous configuration "http://localhost:8083/recorder/"

@jpmens
Copy link
Member

jpmens commented Sep 5, 2024 via email

@jeanmi151
Copy link
Author

okay thanks for clarifying :)

I guess we can close the issue if it is not one

@jpmens jpmens closed this as completed Sep 5, 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

3 participants
@jpmens @jeanmi151 and others