This commit is contained in:
parent
056a22e2e3
commit
d2149bd99f
@ -8,6 +8,7 @@ RUN npm ci
|
||||
COPY . .
|
||||
|
||||
ENV VITE_API_BASE_URL=/api
|
||||
ENV VITE_SOCKET_URL=/socket.io
|
||||
RUN npm run build
|
||||
|
||||
FROM nginx:alpine
|
||||
|
||||
@ -12,8 +12,9 @@ class SocketService {
|
||||
if (this.socket && this.socket.connected) {
|
||||
return this.socket;
|
||||
}
|
||||
|
||||
this.socket = io('http://localhost:3000', {
|
||||
const socketUrl =
|
||||
import.meta.env.VITE_SOCKET_URL || 'http://localhost:3000';
|
||||
this.socket = io(socketUrl, {
|
||||
auth: {
|
||||
token,
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user