From d988fdc19b74571db3f8ab703fc015b58f9edba8 Mon Sep 17 00:00:00 2001 From: "Jessica F. Martinez" Date: Mon, 2 Dec 2024 09:15:59 +0100 Subject: [PATCH] Testing server routes --- Dockerfile.production | 7 +++++-- nginx_copy.conf | 8 ++------ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Dockerfile.production b/Dockerfile.production index 5645ddb..a628730 100644 --- a/Dockerfile.production +++ b/Dockerfile.production @@ -59,7 +59,10 @@ RUN apt-get update && apt-get install -y curl && \ apt-get clean # Exponer los puertos necesarios -EXPOSE 80 3000 +#EXPOSE 80 3000 # Inicia Nuxt 3 y Nginx -CMD node .output/server/index.mjs & nginx -g "daemon off;" \ No newline at end of file +#CMD node .output/server/index.mjs & nginx -g "daemon off;" + +CMD ["node", ".output/server/index.mjs"] +EXPOSE 3000 \ No newline at end of file diff --git a/nginx_copy.conf b/nginx_copy.conf index 2c11473..c9c6231 100644 --- a/nginx_copy.conf +++ b/nginx_copy.conf @@ -1,7 +1,3 @@ -upstream nuxt_app { - server app:3000; # 'app' es el nombre del contenedor Nuxt -} - server { listen 80; # Nginx escucha en el puerto 80, expuesto al host @@ -16,14 +12,14 @@ server { # } location / { - proxy_pass http://nuxt_app; + proxy_pass http://localhost:3000; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; } - + # location / { # proxy_pass http://localhost:3000; # AquĆ­ hacemos el proxy hacia el puerto 3000 dentro del contenedor # proxy_http_version 1.1;