diff --git a/docker-compose.yml b/docker-compose.yml index 9bcaab9..f689f10 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,10 +3,22 @@ services: build: context: . dockerfile: dockerfile - container_name: web + network: host + container_name: nuitdelinfo restart: always - ports: - - 8080:2486 volumes: - ./back/data:/app/data + networks: + - traefik + labels: + - "traefik.enable=true" + - "traefik.http.routers.nuitdelinfo.rule=Host(`nuitdelinfo.leizour.fr`)" + - "traefik.http.routers.nuitdelinfo.entrypoints=websecure" + - "traefik.http.routers.nuitdelinfo.tls=true" + - "traefik.http.routers.nuitdelinfo.tls.certresolver=myresolver" + - "traefik.http.services.nuitdelinfo.loadbalancer.server.port=2486" + +networks: + traefik: + external: true diff --git a/front/src/components/3d/Axes.tsx b/front/src/components/3d/Axes.tsx index 195e266..29e489a 100644 --- a/front/src/components/3d/Axes.tsx +++ b/front/src/components/3d/Axes.tsx @@ -1,6 +1,4 @@ -import React from 'react' import { LineBasicMaterial, Line, Group } from 'three' -import { useFrame } from '@react-three/fiber' import * as THREE from 'three' export default function Axes() { diff --git a/front/src/components/3d/Character.tsx b/front/src/components/3d/Character.tsx index f6d7d66..272f3c3 100644 --- a/front/src/components/3d/Character.tsx +++ b/front/src/components/3d/Character.tsx @@ -1,11 +1,10 @@ -import { Group, Mesh, MeshStandardMaterial, BufferGeometry } from 'three' import { useGLTF } from '@react-three/drei' export default function Character() { // import glb file // load the glb file in "/models/BASEmodel.glb" - const { nodes, materials, scene } = useGLTF('/models/man.glb') + const { scene } = useGLTF('/models/man.glb') // rotate the character scene.rotation.x = -Math.PI / 2 diff --git a/front/src/components/3d/Floor.tsx b/front/src/components/3d/Floor.tsx index dbb054b..7a24e3f 100644 --- a/front/src/components/3d/Floor.tsx +++ b/front/src/components/3d/Floor.tsx @@ -1,5 +1,3 @@ - -import React from 'react' import { Group } from 'three' import * as THREE from 'three' diff --git a/front/src/components/3d/Marker.tsx b/front/src/components/3d/Marker.tsx index 893f4f1..61419d9 100644 --- a/front/src/components/3d/Marker.tsx +++ b/front/src/components/3d/Marker.tsx @@ -1,23 +1,22 @@ import React from 'react' -import { Group } from 'three' import * as THREE from 'three' interface MarkerProps { - position: [number, number, number], + position: number[], color: string, onClick?: () => void } export default function Marker({ position, color, onClick }: MarkerProps) { - const [positionState, setPositionState] = React.useState(position) + const [positionState, setPositionState] = React.useState(new THREE.Vector3(...position)) // Return the marker object // return return ( - setPositionState([positionState[0], positionState[1], positionState[2] + 0.1])} onPointerOut={(e) => setPositionState(position)}> + setPositionState(positionState.clone().setZ(positionState.z + 0.1))} onPointerOut={() => setPositionState(new THREE.Vector3(...position))}> - ) + ) } diff --git a/front/src/components/3d/Ocean.tsx b/front/src/components/3d/Ocean.tsx index 6b9d8cf..0808e50 100644 --- a/front/src/components/3d/Ocean.tsx +++ b/front/src/components/3d/Ocean.tsx @@ -2,7 +2,6 @@ import React, { useEffect, useRef } from 'react'; import * as THREE from 'three'; import { Water, WaterOptions } from 'three/examples/jsm/objects/Water.js'; -import { WaterMesh, WaterMeshOptions } from 'three/examples/jsm/objects/Water2Mesh.js'; const Ocean: React.FC = () => { diff --git a/front/src/components/Button.tsx b/front/src/components/Button.tsx index 3f548fd..db4b4ad 100644 --- a/front/src/components/Button.tsx +++ b/front/src/components/Button.tsx @@ -1,4 +1,4 @@ -import { ReactNode, MouseEventHandler } from 'react'; +import { ReactNode } from 'react'; interface ButtonProps { color: 'primary' | 'secondary'; diff --git a/front/src/components/FstSection.tsx b/front/src/components/FstSection.tsx index 67bec8f..40afbcc 100644 --- a/front/src/components/FstSection.tsx +++ b/front/src/components/FstSection.tsx @@ -1,5 +1,4 @@ import Button from "./Button"; -import ButtonLink from "./ButtonLink"; import NavBar from "./NavBar"; export default function FstSection () { diff --git a/front/src/components/NavBar.tsx b/front/src/components/NavBar.tsx index b5ebe21..a2a3fab 100644 --- a/front/src/components/NavBar.tsx +++ b/front/src/components/NavBar.tsx @@ -1,4 +1,3 @@ -import LogoButton from '../components/LogoButton.tsx' import ClickableLink from './ClickableLink.tsx'; import RoundButton from './RoundButton.tsx'; @@ -7,7 +6,7 @@ export default function NavBar(){