mirror of
https://github.com/plankanban/planka.git
synced 2026-02-24 19:08:59 +03:00
Wrong path to socket.io in production mode when client and server are different #514
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @emmguyot-adscom on GitHub (May 21, 2024).
I'm trying to deploy planka with the following directories :
In the client part, I've modified .env to set :
The client is build for production and deployed as static in the planka folder.
First, I had to modify config-overrides.js to replace <%= BASE_URL %> by process.env.PUBLIC_URL in order index.html works as static
But anyway, that's not the point of this issue.
The point is that with this configuration, the planka client keeps to try to access the server at https://xxxx/planka/socket.io/....
I've checked the code and it seems to be in api/socket.js where I see:
socket.path = `${Config.BASE_PATH}/socket.io`;I think it should be
socket.path = `${Config.SERVER_BASE_PATH}/socket.io`;where SERVER_BASE_PATH would be a new constant.
Am I wrong?
@meltyshev commented on GitHub (May 22, 2024):
Hi! You're absolutely right, we've never tested this way of deployment. And it seems that your suggestion of adding
SERVER_BASE_PATHwould solve the problem.@emmguyot commented on GitHub (May 22, 2024):
Ok, I'll submit a PR