mujx / hakatime

Wakatime server implementation & analytics dashboard
https://hakatime.mtx-dev.xyz
The Unlicense
610 stars 45 forks source link

Nginx and Docker #73

Closed rick-gnous closed 1 year ago

rick-gnous commented 1 year ago

Strangely, v1.7.1 and v1.7.2 docker versions don't work on Debian 11 with reverse proxy with Nginx. I got a white screen with nothing. Seems like it doesn't find the JavaScript file ? I'll investigate later if I've time. I use docker compose file to launch Hakatime. v1.7.0 and v1.6.3 work fine.

my basic nginx configuration:

    root /var/www/html;

    location /haka/ {
        proxy_pass http://localhost:9621/;
        proxy_set_header Host ;
    }

    location / {
        try_files $uri $uri/ =404;
    }
mujx commented 1 year ago

Could you take a look over this issue to see if that solves your problem? https://github.com/mujx/hakatime/issues/14#issuecomment-767836113

rick-gnous commented 1 year ago

I forget to say I've tried with these configuration and it doesn't work. I've created a subdomain for it and use 1.7.2 and it works fine. I think it's coming from nginx which doesn't redirect /index.js to proxy but to my root folder.

mujx commented 1 year ago

Check the linked issue. You'll need to rewrite some paths and also provide the prefix path on hakatime to work like this.