From fcae78552bf05685aadc8e432412df06df224fb8 Mon Sep 17 00:00:00 2001 From: Thomas CHAZOT Date: Tue, 5 Dec 2023 09:40:32 +0100 Subject: [PATCH 01/33] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'cryptide=5Fp?= =?UTF-8?q?roject/Dockerfile'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cryptide_project/Dockerfile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cryptide_project/Dockerfile b/cryptide_project/Dockerfile index fbd4dc7..02692b7 100644 --- a/cryptide_project/Dockerfile +++ b/cryptide_project/Dockerfile @@ -10,6 +10,14 @@ COPY . . RUN npm run build +RUN ls build + +RUN ls build/static + +RUN ls build/static/css + +RUN ls build/static/js + EXPOSE 80 # # Installez express From 5a6e49b6796102c8d50e1c0371f87a10eb39aba3 Mon Sep 17 00:00:00 2001 From: Thomas CHAZOT Date: Tue, 5 Dec 2023 09:44:37 +0100 Subject: [PATCH 02/33] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'cryptide=5Fp?= =?UTF-8?q?roject/server.js'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cryptide_project/server.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cryptide_project/server.js b/cryptide_project/server.js index cb7b31b..133d199 100644 --- a/cryptide_project/server.js +++ b/cryptide_project/server.js @@ -8,11 +8,17 @@ const port = process.env.PORT || 80; app.use(express.static(path.join(__dirname, 'build'))); // Définir le type MIME pour les fichiers JavaScript -app.use('*.js', (req, res, next) => { +app.use('/static/js', (req, res, next) => { res.type('application/javascript; charset=utf-8'); next(); }); +// Définir le type MIME pour les fichiers CSS +app.use('/static/css', (req, res, next) => { + res.type('text/css; charset=utf-8'); + next(); +}); + // Route par défaut pour servir l'application React app.get('*', (req, res) => { res.sendFile(path.join(__dirname, 'build', 'index.html')); From 8b7775eccad3b66b39071bf3ce42b476e868ee7f Mon Sep 17 00:00:00 2001 From: Thomas CHAZOT Date: Tue, 5 Dec 2023 09:49:40 +0100 Subject: [PATCH 03/33] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'cryptide=5Fp?= =?UTF-8?q?roject/server.js'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cryptide_project/server.js | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/cryptide_project/server.js b/cryptide_project/server.js index 133d199..e7bdc71 100644 --- a/cryptide_project/server.js +++ b/cryptide_project/server.js @@ -2,22 +2,16 @@ const express = require('express'); const path = require('path'); const app = express(); -const port = process.env.PORT || 80; +const port = process.env.PORT || 5000; // Servir les fichiers statiques depuis le dossier 'build' app.use(express.static(path.join(__dirname, 'build'))); // Définir le type MIME pour les fichiers JavaScript -app.use('/static/js', (req, res, next) => { - res.type('application/javascript; charset=utf-8'); - next(); -}); +app.use('/static/js', express.static(path.join(__dirname, 'build/static/js'))); // Définir le type MIME pour les fichiers CSS -app.use('/static/css', (req, res, next) => { - res.type('text/css; charset=utf-8'); - next(); -}); +app.use('/static/css', express.static(path.join(__dirname, 'build/static/css'))); // Route par défaut pour servir l'application React app.get('*', (req, res) => { @@ -28,3 +22,4 @@ app.get('*', (req, res) => { app.listen(port, () => { console.log(`Serveur en cours d'exécution sur le port ${port}`); }); + From cbf548d9a04f3ad74bf1de844ad1b879e41cca52 Mon Sep 17 00:00:00 2001 From: Thomas CHAZOT Date: Tue, 5 Dec 2023 09:58:39 +0100 Subject: [PATCH 04/33] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'cryptide=5Fp?= =?UTF-8?q?roject/server.js'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cryptide_project/server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cryptide_project/server.js b/cryptide_project/server.js index e7bdc71..83dd3f9 100644 --- a/cryptide_project/server.js +++ b/cryptide_project/server.js @@ -2,7 +2,7 @@ const express = require('express'); const path = require('path'); const app = express(); -const port = process.env.PORT || 5000; +const port = process.env.PORT || 80; // Servir les fichiers statiques depuis le dossier 'build' app.use(express.static(path.join(__dirname, 'build'))); From 6f388ee55e3d19a1f711ec08f04015b89ff0792c Mon Sep 17 00:00:00 2001 From: Thomas CHAZOT Date: Tue, 5 Dec 2023 10:03:28 +0100 Subject: [PATCH 05/33] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'cryptide=5Fp?= =?UTF-8?q?roject/server.js'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cryptide_project/server.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/cryptide_project/server.js b/cryptide_project/server.js index 83dd3f9..0ed5fb2 100644 --- a/cryptide_project/server.js +++ b/cryptide_project/server.js @@ -8,10 +8,16 @@ const port = process.env.PORT || 80; app.use(express.static(path.join(__dirname, 'build'))); // Définir le type MIME pour les fichiers JavaScript -app.use('/static/js', express.static(path.join(__dirname, 'build/static/js'))); +app.use('/static/js', (req, res, next) => { + res.type('application/javascript; charset=utf-8'); + next(); +}, express.static(path.join(__dirname, 'build/static/js'))); // Définir le type MIME pour les fichiers CSS -app.use('/static/css', express.static(path.join(__dirname, 'build/static/css'))); +app.use('/static/css', (req, res, next) => { + res.type('text/css; charset=utf-8'); + next(); +}, express.static(path.join(__dirname, 'build/static/css'))); // Route par défaut pour servir l'application React app.get('*', (req, res) => { @@ -22,4 +28,3 @@ app.get('*', (req, res) => { app.listen(port, () => { console.log(`Serveur en cours d'exécution sur le port ${port}`); }); - From d506edcaf2da6be295119e3555f556b82efe6905 Mon Sep 17 00:00:00 2001 From: Thomas CHAZOT Date: Tue, 5 Dec 2023 10:14:21 +0100 Subject: [PATCH 06/33] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'cryptide=5Fp?= =?UTF-8?q?roject/server.js'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cryptide_project/server.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cryptide_project/server.js b/cryptide_project/server.js index 0ed5fb2..f92fafe 100644 --- a/cryptide_project/server.js +++ b/cryptide_project/server.js @@ -5,23 +5,23 @@ const app = express(); const port = process.env.PORT || 80; // Servir les fichiers statiques depuis le dossier 'build' -app.use(express.static(path.join(__dirname, 'build'))); +app.use(express.static(path.join(__dirname))); // Définir le type MIME pour les fichiers JavaScript app.use('/static/js', (req, res, next) => { res.type('application/javascript; charset=utf-8'); next(); -}, express.static(path.join(__dirname, 'build/static/js'))); +}, express.static(path.join(__dirname, 'static/js'))); // Définir le type MIME pour les fichiers CSS app.use('/static/css', (req, res, next) => { res.type('text/css; charset=utf-8'); next(); -}, express.static(path.join(__dirname, 'build/static/css'))); +}, express.static(path.join(__dirname, 'static/css'))); // Route par défaut pour servir l'application React app.get('*', (req, res) => { - res.sendFile(path.join(__dirname, 'build', 'index.html')); + res.sendFile(path.join(__dirname, 'index.html')); }); // Démarrer le serveur From d940cc1f1caf2b3a7e5f24ecb93a95e72ac47acf Mon Sep 17 00:00:00 2001 From: Thomas CHAZOT Date: Tue, 5 Dec 2023 10:14:48 +0100 Subject: [PATCH 07/33] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'cryptide=5Fp?= =?UTF-8?q?roject/Dockerfile'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cryptide_project/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cryptide_project/Dockerfile b/cryptide_project/Dockerfile index 02692b7..750fca2 100644 --- a/cryptide_project/Dockerfile +++ b/cryptide_project/Dockerfile @@ -24,7 +24,7 @@ EXPOSE 80 RUN npm install express # Copiez le script serveur personnalisé -COPY server.js . +COPY server.js ./build/ # Commande pour démarrer le serveur personnalisé -CMD ["node", "server.js"] +CMD ["node", "build/server.js"] From a4c1e882c8c9200b67b3f303fb69f707eb1040f0 Mon Sep 17 00:00:00 2001 From: Thomas CHAZOT Date: Tue, 5 Dec 2023 10:18:26 +0100 Subject: [PATCH 08/33] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'cryptide=5Fp?= =?UTF-8?q?roject/Dockerfile'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cryptide_project/Dockerfile | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/cryptide_project/Dockerfile b/cryptide_project/Dockerfile index 750fca2..c95d0ed 100644 --- a/cryptide_project/Dockerfile +++ b/cryptide_project/Dockerfile @@ -10,13 +10,9 @@ COPY . . RUN npm run build -RUN ls build +RUN cp build . -RUN ls build/static - -RUN ls build/static/css - -RUN ls build/static/js +RUN ls EXPOSE 80 # @@ -24,7 +20,7 @@ EXPOSE 80 RUN npm install express # Copiez le script serveur personnalisé -COPY server.js ./build/ +COPY server.js . # Commande pour démarrer le serveur personnalisé -CMD ["node", "build/server.js"] +CMD ["node", "server.js"] From f34a7102c78eadf76d1c8266307c63a74fded26b Mon Sep 17 00:00:00 2001 From: Thomas CHAZOT Date: Tue, 5 Dec 2023 10:20:44 +0100 Subject: [PATCH 09/33] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'cryptide=5Fp?= =?UTF-8?q?roject/Dockerfile'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cryptide_project/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cryptide_project/Dockerfile b/cryptide_project/Dockerfile index c95d0ed..b9d605e 100644 --- a/cryptide_project/Dockerfile +++ b/cryptide_project/Dockerfile @@ -10,7 +10,7 @@ COPY . . RUN npm run build -RUN cp build . +RUN cp -r build . RUN ls From eedaea1b910ee9d25e99c99252d19f3b1efdaf77 Mon Sep 17 00:00:00 2001 From: Thomas CHAZOT Date: Tue, 5 Dec 2023 10:23:26 +0100 Subject: [PATCH 10/33] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'cryptide=5Fp?= =?UTF-8?q?roject/Dockerfile'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cryptide_project/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cryptide_project/Dockerfile b/cryptide_project/Dockerfile index b9d605e..2c3b310 100644 --- a/cryptide_project/Dockerfile +++ b/cryptide_project/Dockerfile @@ -10,7 +10,7 @@ COPY . . RUN npm run build -RUN cp -r build . +RUN cp -r build/ . RUN ls From b94edb22e05fba6f15ae37ef2bf9c788ef204ef2 Mon Sep 17 00:00:00 2001 From: Thomas CHAZOT Date: Tue, 5 Dec 2023 10:26:17 +0100 Subject: [PATCH 11/33] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'cryptide=5Fp?= =?UTF-8?q?roject/Dockerfile'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cryptide_project/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cryptide_project/Dockerfile b/cryptide_project/Dockerfile index 2c3b310..62be6be 100644 --- a/cryptide_project/Dockerfile +++ b/cryptide_project/Dockerfile @@ -10,7 +10,7 @@ COPY . . RUN npm run build -RUN cp -r build/ . +RUN cp -r build/* . RUN ls From a39fcadf2f377fb8f1dfb2092c32bd129c4fa100 Mon Sep 17 00:00:00 2001 From: Thomas CHAZOT Date: Tue, 5 Dec 2023 10:32:52 +0100 Subject: [PATCH 12/33] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'cryptide=5Fp?= =?UTF-8?q?roject/server.js'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cryptide_project/server.js | 1 + 1 file changed, 1 insertion(+) diff --git a/cryptide_project/server.js b/cryptide_project/server.js index f92fafe..e71728d 100644 --- a/cryptide_project/server.js +++ b/cryptide_project/server.js @@ -27,4 +27,5 @@ app.get('*', (req, res) => { // Démarrer le serveur app.listen(port, () => { console.log(`Serveur en cours d'exécution sur le port ${port}`); + console.log(path.join(__dirname, 'static/css')) }); From b5992b2ae6793b4e97446c394fe04be2c05926ae Mon Sep 17 00:00:00 2001 From: Thomas CHAZOT Date: Tue, 5 Dec 2023 10:41:39 +0100 Subject: [PATCH 13/33] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'cryptide=5Fp?= =?UTF-8?q?roject/Dockerfile'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cryptide_project/Dockerfile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/cryptide_project/Dockerfile b/cryptide_project/Dockerfile index 62be6be..087b86e 100644 --- a/cryptide_project/Dockerfile +++ b/cryptide_project/Dockerfile @@ -10,8 +10,6 @@ COPY . . RUN npm run build -RUN cp -r build/* . - RUN ls EXPOSE 80 @@ -20,7 +18,7 @@ EXPOSE 80 RUN npm install express # Copiez le script serveur personnalisé -COPY server.js . +COPY server.js ./build/ # Commande pour démarrer le serveur personnalisé -CMD ["node", "server.js"] +CMD ["node", "build/server.js"] From 2305a00d57d52d643aa2e849714975940895fe20 Mon Sep 17 00:00:00 2001 From: Thomas CHAZOT Date: Tue, 5 Dec 2023 10:51:19 +0100 Subject: [PATCH 14/33] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'cryptide=5Fp?= =?UTF-8?q?roject/Dockerfile'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cryptide_project/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cryptide_project/Dockerfile b/cryptide_project/Dockerfile index 087b86e..eb5feaf 100644 --- a/cryptide_project/Dockerfile +++ b/cryptide_project/Dockerfile @@ -18,7 +18,7 @@ EXPOSE 80 RUN npm install express # Copiez le script serveur personnalisé -COPY server.js ./build/ +COPY server.js . # Commande pour démarrer le serveur personnalisé -CMD ["node", "build/server.js"] +ENTRYPOINT ["node", "server.js"] From 05d1a7bf6bb80812a52608e1b690afa2d1f11e66 Mon Sep 17 00:00:00 2001 From: Thomas CHAZOT Date: Tue, 5 Dec 2023 10:51:51 +0100 Subject: [PATCH 15/33] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'cryptide=5Fp?= =?UTF-8?q?roject/server.js'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cryptide_project/server.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cryptide_project/server.js b/cryptide_project/server.js index e71728d..d163f48 100644 --- a/cryptide_project/server.js +++ b/cryptide_project/server.js @@ -5,27 +5,27 @@ const app = express(); const port = process.env.PORT || 80; // Servir les fichiers statiques depuis le dossier 'build' -app.use(express.static(path.join(__dirname))); +app.use(express.static(path.join(__dirname), "build")); // Définir le type MIME pour les fichiers JavaScript app.use('/static/js', (req, res, next) => { res.type('application/javascript; charset=utf-8'); next(); -}, express.static(path.join(__dirname, 'static/js'))); +}, express.static(path.join(__dirname, '"build"/static/js'))); // Définir le type MIME pour les fichiers CSS app.use('/static/css', (req, res, next) => { res.type('text/css; charset=utf-8'); next(); -}, express.static(path.join(__dirname, 'static/css'))); +}, express.static(path.join(__dirname, '"build"/static/css'))); // Route par défaut pour servir l'application React app.get('*', (req, res) => { - res.sendFile(path.join(__dirname, 'index.html')); + res.sendFile(path.join(__dirname, '"build"/index.html')); }); // Démarrer le serveur app.listen(port, () => { console.log(`Serveur en cours d'exécution sur le port ${port}`); - console.log(path.join(__dirname, 'static/css')) + console.log(path.join(__dirname, '"build"/static/css')) }); From 7abafb9d814eeded9335839735e9b1ed22a79185 Mon Sep 17 00:00:00 2001 From: Thomas CHAZOT Date: Tue, 5 Dec 2023 10:55:58 +0100 Subject: [PATCH 16/33] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'cryptide=5Fp?= =?UTF-8?q?roject/server.js'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cryptide_project/server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cryptide_project/server.js b/cryptide_project/server.js index d163f48..dc8d21f 100644 --- a/cryptide_project/server.js +++ b/cryptide_project/server.js @@ -27,5 +27,5 @@ app.get('*', (req, res) => { // Démarrer le serveur app.listen(port, () => { console.log(`Serveur en cours d'exécution sur le port ${port}`); - console.log(path.join(__dirname, '"build"/static/css')) + //console.log(path.join(__dirname, '"build"/static/css')) }); From 5aef6554608ff72f806627fa79e413b85a6cd23e Mon Sep 17 00:00:00 2001 From: Thomas CHAZOT Date: Tue, 5 Dec 2023 10:56:50 +0100 Subject: [PATCH 17/33] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'cryptide=5Fp?= =?UTF-8?q?roject/server.js'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cryptide_project/server.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/cryptide_project/server.js b/cryptide_project/server.js index dc8d21f..0ed5fb2 100644 --- a/cryptide_project/server.js +++ b/cryptide_project/server.js @@ -5,27 +5,26 @@ const app = express(); const port = process.env.PORT || 80; // Servir les fichiers statiques depuis le dossier 'build' -app.use(express.static(path.join(__dirname), "build")); +app.use(express.static(path.join(__dirname, 'build'))); // Définir le type MIME pour les fichiers JavaScript app.use('/static/js', (req, res, next) => { res.type('application/javascript; charset=utf-8'); next(); -}, express.static(path.join(__dirname, '"build"/static/js'))); +}, express.static(path.join(__dirname, 'build/static/js'))); // Définir le type MIME pour les fichiers CSS app.use('/static/css', (req, res, next) => { res.type('text/css; charset=utf-8'); next(); -}, express.static(path.join(__dirname, '"build"/static/css'))); +}, express.static(path.join(__dirname, 'build/static/css'))); // Route par défaut pour servir l'application React app.get('*', (req, res) => { - res.sendFile(path.join(__dirname, '"build"/index.html')); + res.sendFile(path.join(__dirname, 'build', 'index.html')); }); // Démarrer le serveur app.listen(port, () => { console.log(`Serveur en cours d'exécution sur le port ${port}`); - //console.log(path.join(__dirname, '"build"/static/css')) }); From 0adb5a1b0ec22484e0175cf2755df7d738e77546 Mon Sep 17 00:00:00 2001 From: Thomas CHAZOT Date: Tue, 5 Dec 2023 11:00:18 +0100 Subject: [PATCH 18/33] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'cryptide=5Fp?= =?UTF-8?q?roject/server.js'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cryptide_project/server.js | 1 + 1 file changed, 1 insertion(+) diff --git a/cryptide_project/server.js b/cryptide_project/server.js index 0ed5fb2..3ef9f10 100644 --- a/cryptide_project/server.js +++ b/cryptide_project/server.js @@ -27,4 +27,5 @@ app.get('*', (req, res) => { // Démarrer le serveur app.listen(port, () => { console.log(`Serveur en cours d'exécution sur le port ${port}`); + console.log(path.join(__dirname, 'build')) }); From 67891cf1ea2b756a68ea2245d5f10e062b65eae1 Mon Sep 17 00:00:00 2001 From: Thomas CHAZOT Date: Tue, 5 Dec 2023 11:03:21 +0100 Subject: [PATCH 19/33] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'cryptide=5Fp?= =?UTF-8?q?roject/Dockerfile'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cryptide_project/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cryptide_project/Dockerfile b/cryptide_project/Dockerfile index eb5feaf..02b079a 100644 --- a/cryptide_project/Dockerfile +++ b/cryptide_project/Dockerfile @@ -21,4 +21,4 @@ RUN npm install express COPY server.js . # Commande pour démarrer le serveur personnalisé -ENTRYPOINT ["node", "server.js"] +ENTRYPOINT ["npm", "start"] From 9baf6ca59db74c3c2315095ad7a4f584909facbc Mon Sep 17 00:00:00 2001 From: Thomas CHAZOT Date: Tue, 5 Dec 2023 11:07:09 +0100 Subject: [PATCH 20/33] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'cryptide=5Fp?= =?UTF-8?q?roject/Dockerfile'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cryptide_project/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cryptide_project/Dockerfile b/cryptide_project/Dockerfile index 02b079a..4c0eb89 100644 --- a/cryptide_project/Dockerfile +++ b/cryptide_project/Dockerfile @@ -12,7 +12,7 @@ RUN npm run build RUN ls -EXPOSE 80 +EXPOSE 3000 # # Installez express RUN npm install express From 23a22a17c4176ab3751cfa2dd9b908aee7c5f220 Mon Sep 17 00:00:00 2001 From: Thomas CHAZOT Date: Tue, 5 Dec 2023 11:12:50 +0100 Subject: [PATCH 21/33] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'cryptide=5Fp?= =?UTF-8?q?roject/Dockerfile'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cryptide_project/Dockerfile | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/cryptide_project/Dockerfile b/cryptide_project/Dockerfile index 4c0eb89..e39f9ea 100644 --- a/cryptide_project/Dockerfile +++ b/cryptide_project/Dockerfile @@ -1,24 +1,29 @@ -FROM node:14 +# Utilisez l'image Node.js LTS comme base +FROM node:14-alpine +# Définissez le répertoire de travail dans le conteneur WORKDIR /app +# Copiez le package.json et le package-lock.json dans le conteneur COPY package*.json ./ +# Installez les dépendances du projet RUN npm install +# Copiez le reste des fichiers de l'application dans le conteneur COPY . . +# Construisez l'application React RUN npm run build -RUN ls +# Utilisez l'image légère Nginx pour servir l'application construite +FROM nginx:alpine -EXPOSE 3000 -# -# Installez express -RUN npm install express +# Copiez les fichiers construits de l'étape précédente dans le répertoire de travail de Nginx +COPY --from=0 /app/build /usr/share/nginx/html -# Copiez le script serveur personnalisé -COPY server.js . +# Exposez le port 80 pour que l'application puisse être accessible +EXPOSE 80 -# Commande pour démarrer le serveur personnalisé -ENTRYPOINT ["npm", "start"] +# Commande pour démarrer Nginx lorsque le conteneur est lancé +CMD ["nginx", "-g", "daemon off;"] From 6fbfb8ee4b69016f6d4bb7b5d37a94ced7ab08ea Mon Sep 17 00:00:00 2001 From: Thomas CHAZOT Date: Tue, 5 Dec 2023 11:16:41 +0100 Subject: [PATCH 22/33] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'cryptide=5Fp?= =?UTF-8?q?roject/Dockerfile'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cryptide_project/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cryptide_project/Dockerfile b/cryptide_project/Dockerfile index e39f9ea..26d5625 100644 --- a/cryptide_project/Dockerfile +++ b/cryptide_project/Dockerfile @@ -26,4 +26,4 @@ COPY --from=0 /app/build /usr/share/nginx/html EXPOSE 80 # Commande pour démarrer Nginx lorsque le conteneur est lancé -CMD ["nginx", "-g", "daemon off;"] +ENTRYPOINT ["nginx", "-g", "daemon off;"] From 6f3f01bbb5e625d93969e1a710b939de491a7e2a Mon Sep 17 00:00:00 2001 From: Thomas CHAZOT Date: Tue, 5 Dec 2023 14:12:44 +0100 Subject: [PATCH 23/33] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'cryptide=5Fp?= =?UTF-8?q?roject/Dockerfile'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cryptide_project/Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cryptide_project/Dockerfile b/cryptide_project/Dockerfile index 26d5625..591738e 100644 --- a/cryptide_project/Dockerfile +++ b/cryptide_project/Dockerfile @@ -22,8 +22,11 @@ FROM nginx:alpine # Copiez les fichiers construits de l'étape précédente dans le répertoire de travail de Nginx COPY --from=0 /app/build /usr/share/nginx/html +# Copiez la configuration Nginx personnalisée +COPY nginx.conf /etc/nginx/conf.d/default.conf + # Exposez le port 80 pour que l'application puisse être accessible EXPOSE 80 -# Commande pour démarrer Nginx lorsque le conteneur est lancé +# Définissez ENTRYPOINT pour démarrer Nginx lorsque le conteneur est lancé ENTRYPOINT ["nginx", "-g", "daemon off;"] From fcb35942012cc024ea7c0c07571eb280931cd6b9 Mon Sep 17 00:00:00 2001 From: Thomas CHAZOT Date: Tue, 5 Dec 2023 14:14:32 +0100 Subject: [PATCH 24/33] Ajouter 'cryptide_project/nginx.conf' --- cryptide_project/nginx.conf | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 cryptide_project/nginx.conf diff --git a/cryptide_project/nginx.conf b/cryptide_project/nginx.conf new file mode 100644 index 0000000..9c63b6c --- /dev/null +++ b/cryptide_project/nginx.conf @@ -0,0 +1,16 @@ +server { + listen 80; + server_name localhost; + + location / { + root /usr/share/nginx/html; + index index.html; + try_files $uri $uri/ /index.html; + } + + error_page 404 /index.html; + + location ~ /\. { + deny all; + } +} From d6dedc636e18abd2d0332e38fbe832a50ef2fc1a Mon Sep 17 00:00:00 2001 From: Thomas CHAZOT Date: Tue, 5 Dec 2023 14:17:41 +0100 Subject: [PATCH 25/33] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'cryptide=5Fp?= =?UTF-8?q?roject/nginx.conf'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cryptide_project/nginx.conf | 1 - 1 file changed, 1 deletion(-) diff --git a/cryptide_project/nginx.conf b/cryptide_project/nginx.conf index 9c63b6c..08c7506 100644 --- a/cryptide_project/nginx.conf +++ b/cryptide_project/nginx.conf @@ -1,6 +1,5 @@ server { listen 80; - server_name localhost; location / { root /usr/share/nginx/html; From dd2a0e4215b1f0a7d4717d661fcbfcf340e023cf Mon Sep 17 00:00:00 2001 From: Thomas CHAZOT Date: Tue, 5 Dec 2023 14:24:17 +0100 Subject: [PATCH 26/33] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'cryptide=5Fp?= =?UTF-8?q?roject/nginx.conf'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cryptide_project/nginx.conf | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/cryptide_project/nginx.conf b/cryptide_project/nginx.conf index 08c7506..2f377f8 100644 --- a/cryptide_project/nginx.conf +++ b/cryptide_project/nginx.conf @@ -1,13 +1,25 @@ server { listen 80; - location / { + location /containers/Crypteam-website/ { root /usr/share/nginx/html; index index.html; - try_files $uri $uri/ /index.html; + try_files $uri $uri/ /containers/Crypteam-website/index.html; } - error_page 404 /index.html; + # Ajout du préfixe pour les fichiers JS + location ~ ^/containers/Crypteam-website/static/js/ { + root /usr/share/nginx/html; + try_files $uri $uri/ /containers/Crypteam-website/index.html; + } + + # Ajout du préfixe pour les fichiers CSS + location ~ ^/containers/Crypteam-website/static/css/ { + root /usr/share/nginx/html; + try_files $uri $uri/ /containers/Crypteam-website/index.html; + } + + error_page 404 /containers/Crypteam-website/index.html; location ~ /\. { deny all; From b485cd49dc005449b136882b9558fc39847001c9 Mon Sep 17 00:00:00 2001 From: Thomas CHAZOT Date: Tue, 5 Dec 2023 14:27:50 +0100 Subject: [PATCH 27/33] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'cryptide=5Fp?= =?UTF-8?q?roject/nginx.conf'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cryptide_project/nginx.conf | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/cryptide_project/nginx.conf b/cryptide_project/nginx.conf index 2f377f8..1e77fca 100644 --- a/cryptide_project/nginx.conf +++ b/cryptide_project/nginx.conf @@ -7,18 +7,6 @@ server { try_files $uri $uri/ /containers/Crypteam-website/index.html; } - # Ajout du préfixe pour les fichiers JS - location ~ ^/containers/Crypteam-website/static/js/ { - root /usr/share/nginx/html; - try_files $uri $uri/ /containers/Crypteam-website/index.html; - } - - # Ajout du préfixe pour les fichiers CSS - location ~ ^/containers/Crypteam-website/static/css/ { - root /usr/share/nginx/html; - try_files $uri $uri/ /containers/Crypteam-website/index.html; - } - error_page 404 /containers/Crypteam-website/index.html; location ~ /\. { From 134724b82c6833699449c6d13843b8d2eb268168 Mon Sep 17 00:00:00 2001 From: Thomas CHAZOT Date: Tue, 5 Dec 2023 14:32:32 +0100 Subject: [PATCH 28/33] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'cryptide=5Fp?= =?UTF-8?q?roject/package.json'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cryptide_project/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/cryptide_project/package.json b/cryptide_project/package.json index abab668..af760f0 100644 --- a/cryptide_project/package.json +++ b/cryptide_project/package.json @@ -1,6 +1,7 @@ { "name": "cryptide", "version": "1.0.0", + "homepage": "/containers/Crypteam-website/", "dependencies": { "@fortawesome/fontawesome-svg-core": "^6.4.2", "@fortawesome/free-regular-svg-icons": "^6.4.2", From d5f74860ef30cdc2d08060fe1fea493ae4da0901 Mon Sep 17 00:00:00 2001 From: Thomas CHAZOT Date: Tue, 5 Dec 2023 14:35:43 +0100 Subject: [PATCH 29/33] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'cryptide=5Fp?= =?UTF-8?q?roject/Dockerfile'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cryptide_project/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/cryptide_project/Dockerfile b/cryptide_project/Dockerfile index 591738e..64757e5 100644 --- a/cryptide_project/Dockerfile +++ b/cryptide_project/Dockerfile @@ -30,3 +30,4 @@ EXPOSE 80 # Définissez ENTRYPOINT pour démarrer Nginx lorsque le conteneur est lancé ENTRYPOINT ["nginx", "-g", "daemon off;"] +# \ No newline at end of file From 2ea4ea1d3102a3ffa2fc0a0b5dba1ed7b2e177ce Mon Sep 17 00:00:00 2001 From: Thomas CHAZOT Date: Tue, 5 Dec 2023 14:38:42 +0100 Subject: [PATCH 30/33] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'cryptide=5Fp?= =?UTF-8?q?roject/nginx.conf'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cryptide_project/nginx.conf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cryptide_project/nginx.conf b/cryptide_project/nginx.conf index 1e77fca..a1bba5b 100644 --- a/cryptide_project/nginx.conf +++ b/cryptide_project/nginx.conf @@ -1,15 +1,15 @@ server { listen 80; - location /containers/Crypteam-website/ { + location / { root /usr/share/nginx/html; index index.html; - try_files $uri $uri/ /containers/Crypteam-website/index.html; + try_files $uri $uri/ /index.html; } - error_page 404 /containers/Crypteam-website/index.html; + error_page 404 /index.html; location ~ /\. { deny all; } -} +} \ No newline at end of file From 616114185dbe7a43c2784b3d1433d7fed1444b74 Mon Sep 17 00:00:00 2001 From: Thomas CHAZOT Date: Tue, 5 Dec 2023 14:40:17 +0100 Subject: [PATCH 31/33] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'cryptide=5Fp?= =?UTF-8?q?roject/Dockerfile'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cryptide_project/Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/cryptide_project/Dockerfile b/cryptide_project/Dockerfile index 64757e5..591738e 100644 --- a/cryptide_project/Dockerfile +++ b/cryptide_project/Dockerfile @@ -30,4 +30,3 @@ EXPOSE 80 # Définissez ENTRYPOINT pour démarrer Nginx lorsque le conteneur est lancé ENTRYPOINT ["nginx", "-g", "daemon off;"] -# \ No newline at end of file From 97de73e6b2f4d40aa06208242163b1c26c124bd7 Mon Sep 17 00:00:00 2001 From: Thomas CHAZOT Date: Tue, 5 Dec 2023 14:47:00 +0100 Subject: [PATCH 32/33] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'cryptide=5Fp?= =?UTF-8?q?roject/nginx.conf'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cryptide_project/nginx.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cryptide_project/nginx.conf b/cryptide_project/nginx.conf index a1bba5b..fd270f0 100644 --- a/cryptide_project/nginx.conf +++ b/cryptide_project/nginx.conf @@ -1,10 +1,10 @@ server { listen 80; - location / { + location /containers/Crypteam-website/ { root /usr/share/nginx/html; index index.html; - try_files $uri $uri/ /index.html; + try_files $uri $uri/ /containers/Crypteam-website/index.html; } error_page 404 /index.html; From 4f262401ce4a7ad544f9234f3579571877dab4ab Mon Sep 17 00:00:00 2001 From: Thomas CHAZOT Date: Tue, 5 Dec 2023 14:49:58 +0100 Subject: [PATCH 33/33] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'cryptide=5Fp?= =?UTF-8?q?roject/nginx.conf'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cryptide_project/nginx.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cryptide_project/nginx.conf b/cryptide_project/nginx.conf index fd270f0..a1bba5b 100644 --- a/cryptide_project/nginx.conf +++ b/cryptide_project/nginx.conf @@ -1,10 +1,10 @@ server { listen 80; - location /containers/Crypteam-website/ { + location / { root /usr/share/nginx/html; index index.html; - try_files $uri $uri/ /containers/Crypteam-website/index.html; + try_files $uri $uri/ /index.html; } error_page 404 /index.html;