modified: main_dc/docker-compose.yml

new file:   main_dc/yalarba/easySite/easySite/.data/content/contents.sqlite
	modified:   main_dc/yalarba/easySite/easySite/.gitignore
	modified:   main_dc/yalarba/easySite/easySite/Dockerfile
change into Dockerfile for easySite node verstion from 18 to 20
This commit is contained in:
2025-10-28 06:25:37 +05:00
parent b999916073
commit e7c5123f14
4 changed files with 27 additions and 38 deletions
+2 -2
View File
@@ -158,7 +158,7 @@ services:
easysite:
build:
context: ./yalarba/easySite/easySite # путь к вашему Nuxt проекту
context: ./yalarba/easySite/easySite
dockerfile: Dockerfile
container_name: easysite
restart: unless-stopped
@@ -172,7 +172,7 @@ services:
- web-network
- app-network
healthcheck:
test: [ "CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3000/" ]
test: ["CMD", "curl", "-f", "http://localhost:3000/"]
interval: 30s
timeout: 10s
retries: 3
+7 -21
View File
@@ -1,24 +1,10 @@
# Nuxt dev/build outputs
.output
.data
.nuxt
.nitro
.cache
dist
# Node dependencies
# .dockerignore
node_modules
# Logs
logs
.nuxt
.output
.git
*.log
# Misc
.DS_Store
.fleet
.idea
# Local env files
.env
.env.*
!.env.example
.DS_Store
Dockerfile
.dockerignore
+18 -15
View File
@@ -1,24 +1,27 @@
# Dockerfile
FROM node:18-alpine
# Multi-stage build
FROM node:20-alpine AS builder
WORKDIR /app
# Копируем package files
COPY package*.json ./
COPY nuxt.config.ts ./
COPY tsconfig.json ./
# Устанавливаем зависимости
RUN npm ci
# Копируем исходный код
COPY . .
# Собираем приложение
RUN npm run build
# Экспортируем порт
FROM node:20-alpine AS production
RUN apk add --no-cache curl
WORKDIR /app
COPY --from=builder /app/package*.json ./
RUN npm ci --only=production
COPY --from=builder /app/.output ./.output
RUN addgroup -g 1001 -S nodejs
RUN adduser -S nuxtjs -u 1001
RUN chown -R nuxtjs:nodejs /app
USER nuxtjs
EXPOSE 3000
# Запускаем приложение
CMD ["npm", "run", "start"]
CMD ["node", ".output/server/index.mjs"]