Closed jtambasco closed 1 year ago
I run two instances (local and vpn) as well and ran into this also until I put them behind nginx proxy manager.
Do you run them with a shared DB or separate?
I just used the default settings, so I assume they're running with a shared DB? From the installation page, it's unclear to me whether one can use sqlite and have two separate DBs. I tried adding - DB_DATABASE=...
to hopefully use different DB, but it didn't work with sqlite. Should I be using mariadb or postgres instead? Or is it possible to make it work with sqlite?
Last question, your mounted volume the same location? If not then it's two different DBs
I use what's in the docker-compose I attached. For one instance I have:
./speedtest-tracker-gluetun:/config
and for the other I have
./speedtest-tracker:/config
so I assume they should be different DBs?
Yeah those are different, I'll dig into it as this might be just a case of the session colliding.
@jtambasco so you're going to want to override the APP_NAME
environment variable to prevent the sessions from colliding. I suggest passing the 2nd container something like APP_NAME="Speedtest Tracker for VPN"
or something like that.
Source for cookie name which determines session https://github.com/alexjustesen/speedtest-tracker/blob/main/config/session.php#L118-L132
Describe the bug In docker-compose, I have made two instances of speedtest-tracker in a docker-compose:
One of them is to report the speed of my home network, while the other is to report the speed of my home network via some VPN configured in gluetun. It works quite well, with both instances accessible via their respective http(s) ports. When I open both instances at the same time, the web browser forces me to refresh the webpage of one of the instances, and proceeds to log me out of that instance. It then takes a couple of tries to re-log back into that instance, before one of the instances again logs out. The problem only happens if I open both instances.
I assume this is a bug?
Expected behaviour Not get logged out when opening 2 instances. or I guess a workaround would be if somehow the one instance was able to check the speed of both networks, but this sounds like it'd be a lot of work.
Environment