docker: подготовка к запуску в контейнере (Next.js)

- Dockerfile: multi-stage (deps/build/runner), standalone-сборка, non-root user
- next.config.mjs: output: 'standalone'
- docker-compose.yml: порт 3000, env из .env.local
- .dockerignore: node_modules, .next, .env*, кэш
- проверено: npm run build прошёл, standalone артефакт на месте
This commit is contained in:
2026-08-04 20:23:16 +04:00
parent d920f1c559
commit 207ec7e56b
4 changed files with 54 additions and 0 deletions
+9
View File
@@ -0,0 +1,9 @@
# Секреты — только из .env (см. .env.local.example)
services:
web:
build: .
ports:
- "3000:3000"
env_file:
- .env.local
restart: unless-stopped