Skip to content

Commit

Permalink
Testing server routes
Browse files Browse the repository at this point in the history
  • Loading branch information
JessicaFM committed Dec 2, 2024
1 parent 7169145 commit d988fdc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
7 changes: 5 additions & 2 deletions Dockerfile.production
Original file line number Diff line number Diff line change
Expand Up @@ -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;"
#CMD node .output/server/index.mjs & nginx -g "daemon off;"

CMD ["node", ".output/server/index.mjs"]
EXPOSE 3000
8 changes: 2 additions & 6 deletions nginx_copy.conf
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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;
Expand Down

0 comments on commit d988fdc

Please sign in to comment.