Compose de prod pour Coolify : un seul service nginx sans port publie, compose de dev separe

This commit is contained in:
Aurealibe
2026-07-10 04:06:42 +01:00
parent b7b269eadf
commit 25cc54c2e6
3 changed files with 35 additions and 21 deletions
+23
View File
@@ -0,0 +1,23 @@
# Local development only — NOT what production deploys.
# docker compose -f docker-compose.dev.yml up dev # HMR on :4321
# docker compose -f docker-compose.dev.yml up preview # prod-like on :8080
services:
dev:
image: node:22-alpine@sha256:16e22a550f3863206a3f701448c45f7912c6896a62de43add43bb9c86130c3e2
working_dir: /app
command: sh -c "corepack enable && pnpm install --frozen-lockfile && pnpm dev --host"
ports:
- '4321:4321'
volumes:
- .:/app
- node_modules:/app/node_modules
environment:
- ASTRO_TELEMETRY_DISABLED=1
preview:
build: .
ports:
- '8080:8080'
volumes:
node_modules: