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

New CI/CD #168

Merged
merged 13 commits into from
Nov 8, 2023
Merged

New CI/CD #168

merged 13 commits into from
Nov 8, 2023

Conversation

Florian-A
Copy link
Collaborator

@Florian-A Florian-A commented Nov 6, 2023

  / \__
 (    @\___
 /         O
/   (_____/
/_____/   U

@Florian-A Florian-A linked an issue Nov 6, 2023 that may be closed by this pull request
2 tasks
@Florian-A Florian-A self-assigned this Nov 6, 2023
@Florian-A Florian-A requested a review from Sasha-Liu November 6, 2023 15:26
@Florian-A Florian-A added the CI/CD Continuous integration label Nov 6, 2023
Copy link
Owner

@AntoineA67 AntoineA67 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

j'ai essaye ca pour socket.tsx dans le front, jsp si ca aide ca genere une autre erreur

import { io } from "socket.io-client";

const URL: string = "http://localhost"// process.env.REACT_APP_BACKEND_URL?.toString() || '';

const socketOptions = {
  autoConnect: false,
  query: {
    transports: "websocket",
  },
};

export const socket = io(URL, socketOptions);

export const friendsSocket = io(`${URL}`, { ...socketOptions, path: '/friends' });

export const chatsSocket = io(`${URL}`, { ...socketOptions, path: '/chats' });

export const gamesSocket = io(`${URL}`, { ...socketOptions, path: '/game' });

https://socket.io/fr/docs/v3/reverse-proxy/#nodejs-http-proxy

@Florian-A
Copy link
Collaborator Author

Florian-A commented Nov 7, 2023

Ça marche mais il y a ceci dans les logs frontend.

Il y a cette erreur, je ne comprends pas d'où elle peut venir
Screenshot 2023-11-07 at 03 43 23

@Florian-A
Copy link
Collaborator Author

Attention, bien utiliser le second env que j'ai posté dans le wiki pour tester

@Florian-A Florian-A requested a review from AntoineA67 November 7, 2023 02:53
@Florian-A Florian-A added the WIP Working in progress label Nov 7, 2023
Copy link
Owner

@AntoineA67 AntoineA67 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice c'est good j'ai regarde pour enlever l'erreur mais pas trouve pour l'instant

@@ -1,44 +1,13 @@
import { io } from "socket.io-client";

const URL: string = process.env.REACT_APP_BACKEND_URL?.toString() || '';
const URL: string = process.env.REACT_APP_FRONTEND_URL?.toString() || '';
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ne fonctionnera pas si le back et front ont un url different ?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

le commentaire au dessus sert a rien c'est inutile qui a ecrit ca

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

REACT_APP_FRONTEND_URL = http://domain/
REACT_APP_BACKEND_URL = http://domain/api

Les websockets ont besoin d'aller sur juste domain pour apres etre bien redirige par le reverse.

C'est pas beau mais bon, voilà quoi

@Sasha-Liu
Copy link
Collaborator

Sasha-Liu commented Nov 7, 2023

J'arrive pas a supprimer le message d'erreur, mais je trouve ca : facebook/create-react-app#11779
J'ai l'impression qu'on pourrait essayer de changer la porte, peut-etre l'erreur va disappaitre.
Pour moi c'est tres bizarre que le socket essaaie de connecter a la port 8000, c'est une porte de front. C'est comme si nginx a redirige le socket vers le front

@Florian-A Florian-A removed the WIP Working in progress label Nov 8, 2023
@AntoineA67 AntoineA67 merged commit f6cc282 into master Nov 8, 2023
@Florian-A Florian-A deleted the feature/ci-cd-ii branch November 10, 2023 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/CD Continuous integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CI/CD reborn
3 participants