Public Access
1
0

fix: debug eleventy rather than the api server

This commit is contained in:
2025-08-25 20:04:06 -04:00
parent 9296e92032
commit 989e10a5ba

View File

@@ -19,6 +19,7 @@ services:
init: true init: true
container_name: eleventy_dev container_name: eleventy_dev
ports: ports:
- "9229:9229" # Node.js debugger port
- "8080:8080" # Eleventy dev server port - "8080:8080" # Eleventy dev server port
volumes: volumes:
# Mount the project directory for live-reloading. # Mount the project directory for live-reloading.
@@ -30,7 +31,7 @@ services:
# to proxy requests to the API container using its service name ('api'). # to proxy requests to the API container using its service name ('api').
- dev_network - dev_network
# This command runs Eleventy's dev server with file watching. # This command runs Eleventy's dev server with file watching.
command: npm start command: npm run debug
# This service runs your Express API server. # This service runs your Express API server.
api: api:
@@ -44,17 +45,15 @@ services:
container_name: api_dev container_name: api_dev
# The API port does not need to be exposed to the host. The 'eleventy' # The API port does not need to be exposed to the host. The 'eleventy'
# service proxies requests to it over the internal Docker network. # service proxies requests to it over the internal Docker network.
ports:
- "9229:9229" # Node.js debugger port
volumes: volumes:
- .:/app - .:/app
- /app/node_modules - /app/node_modules
networks: networks:
- dev_network - dev_network
# Use Node's built-in --watch mode instead of nodemon. It can be more # Use Node's built-in --watch mode instead of nodemon. It can be more
# stable inside Docker and avoids some of nodemon's complexities. # stable inside Docker and avoids some of nodemon's complexities. The
# The --inspect flag is still used for debugging. # --inspect flag has been moved to the eleventy service.
command: node --inspect=0.0.0.0:9229 src/server.js command: node --watch src/server.js
networks: networks:
dev_network: dev_network: