Compare commits
4 commits
Author | SHA1 | Date | |
---|---|---|---|
|
4f66b5d735 | ||
|
bcca964f31 | ||
|
9a46018399 | ||
|
ad28aa3b28 |
8 changed files with 25 additions and 9 deletions
|
@ -25,15 +25,12 @@ git clone https://github.com/NabilOuldHamou/M1_ProjetWeb
|
||||||
```
|
```
|
||||||
|
|
||||||
<h3>Production</h3>
|
<h3>Production</h3>
|
||||||
Installez **Docker** sur votre machine puis utilisez la commande suivante pour lancer le projet
|
Installez <bold>Docker</bold> sur votre machine puis utilisez la commande suivante pour lancer le projet
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker compose up
|
docker compose up
|
||||||
```
|
```
|
||||||
|
|
||||||
<h3>Développement</h3>
|
|
||||||
TODO
|
|
||||||
|
|
||||||
<h2 id="auth">🤝 Auteurs</h2>
|
<h2 id="auth">🤝 Auteurs</h2>
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
|
|
|
@ -1,5 +1,23 @@
|
||||||
services:
|
services:
|
||||||
|
|
||||||
|
app:
|
||||||
|
build: .
|
||||||
|
hostname: app
|
||||||
|
depends_on:
|
||||||
|
- mongodb
|
||||||
|
- redis
|
||||||
|
environment:
|
||||||
|
- DATABASE_URL=mongodb://temp-root-username:temp-password@mongodb/chat_projetweb?authSource=admin
|
||||||
|
- JWT_SECRET=ba63466f102443f4bb6f3670891358bc4488d0c717f6ebcd3ee3c5144e55fe2d
|
||||||
|
- BODY_SIZE_LIMIT=Infinity
|
||||||
|
ports:
|
||||||
|
- "3000:3000"
|
||||||
|
networks:
|
||||||
|
- app_network
|
||||||
|
volumes:
|
||||||
|
- .:/usr/src/app
|
||||||
|
- /usr/src/app/node_modules
|
||||||
|
|
||||||
mongodb:
|
mongodb:
|
||||||
build: ./mongodb_rs
|
build: ./mongodb_rs
|
||||||
hostname: mongodb
|
hostname: mongodb
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
generator client {
|
generator client {
|
||||||
provider = "prisma-client-js"
|
provider = "prisma-client-js"
|
||||||
|
binaryTargets = ["debian-openssl-1.1.x", "linux-musl-openssl-3.0.x", "linux-musl-arm64-openssl-3.0.x"]
|
||||||
}
|
}
|
||||||
|
|
||||||
datasource db {
|
datasource db {
|
||||||
|
|
|
@ -76,7 +76,7 @@
|
||||||
>
|
>
|
||||||
<!-- Image de profil -->
|
<!-- Image de profil -->
|
||||||
<img
|
<img
|
||||||
src={`http://localhost:5173/${user.profilePicture}`}
|
src={`https://arbres.oxyjen.io/${user.profilePicture}`}
|
||||||
alt="Profile Picture"
|
alt="Profile Picture"
|
||||||
class="h-10 w-10 rounded-full border border-gray-300 cursor-pointer"
|
class="h-10 w-10 rounded-full border border-gray-300 cursor-pointer"
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
<div class="overlay" role="dialog" aria-labelledby="profile-card-title" on:click={onClose}>
|
<div class="overlay" role="dialog" aria-labelledby="profile-card-title" on:click={onClose}>
|
||||||
<div class="profile-card flex flex-col gap-5" on:click|stopPropagation>
|
<div class="profile-card flex flex-col gap-5" on:click|stopPropagation>
|
||||||
<div class="profile-header">
|
<div class="profile-header">
|
||||||
<img src="http://localhost:5173/{user.profilePicture}" alt="Profile" class="profile-image" />
|
<img src="https://arbres.oxyjen.io/{user.profilePicture}" alt="Profile" class="profile-image" />
|
||||||
<h2 id="profile-card-title" class="profile-name">{user.username}</h2>
|
<h2 id="profile-card-title" class="profile-name">{user.username}</h2>
|
||||||
</div>
|
</div>
|
||||||
<div class="profile-info">
|
<div class="profile-info">
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
>
|
>
|
||||||
<div class="flex items-center gap-4">
|
<div class="flex items-center gap-4">
|
||||||
<img
|
<img
|
||||||
src={`http://localhost:5173/${user.profilePicture}`}
|
src={`https://arbres.oxyjen.io/${user.profilePicture}`}
|
||||||
alt="Profile"
|
alt="Profile"
|
||||||
class="h-12 w-12 rounded-full border border-gray-300"
|
class="h-12 w-12 rounded-full border border-gray-300"
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { createClient } from 'redis';
|
import { createClient } from 'redis';
|
||||||
|
|
||||||
const client = await createClient({
|
const client = await createClient({
|
||||||
url: process.env.REDIS_URL || 'redis://localhost:6379'
|
url: process.env.REDIS_URL || 'redis://redis-server:6379'
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ import { io } from "socket.io-client";
|
||||||
|
|
||||||
// Initialisation de la socket
|
// Initialisation de la socket
|
||||||
export const initSocket = () => {
|
export const initSocket = () => {
|
||||||
const socketInstance = io("http://localhost:5173");
|
const socketInstance = io("http://localhost:3000");
|
||||||
let socketId = null;
|
let socketId = null;
|
||||||
|
|
||||||
return socketInstance
|
return socketInstance
|
||||||
|
|
Loading…
Add table
Reference in a new issue