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:
@@ -158,7 +158,7 @@ services:
|
|||||||
|
|
||||||
easysite:
|
easysite:
|
||||||
build:
|
build:
|
||||||
context: ./yalarba/easySite/easySite # путь к вашему Nuxt проекту
|
context: ./yalarba/easySite/easySite
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
container_name: easysite
|
container_name: easysite
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
@@ -172,7 +172,7 @@ services:
|
|||||||
- web-network
|
- web-network
|
||||||
- app-network
|
- app-network
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: [ "CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3000/" ]
|
test: ["CMD", "curl", "-f", "http://localhost:3000/"]
|
||||||
interval: 30s
|
interval: 30s
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
retries: 3
|
retries: 3
|
||||||
|
|||||||
Binary file not shown.
@@ -1,24 +1,10 @@
|
|||||||
# Nuxt dev/build outputs
|
# .dockerignore
|
||||||
.output
|
|
||||||
.data
|
|
||||||
.nuxt
|
|
||||||
.nitro
|
|
||||||
.cache
|
|
||||||
dist
|
|
||||||
|
|
||||||
# Node dependencies
|
|
||||||
node_modules
|
node_modules
|
||||||
|
.nuxt
|
||||||
# Logs
|
.output
|
||||||
logs
|
.git
|
||||||
*.log
|
*.log
|
||||||
|
|
||||||
# Misc
|
|
||||||
.DS_Store
|
|
||||||
.fleet
|
|
||||||
.idea
|
|
||||||
|
|
||||||
# Local env files
|
|
||||||
.env
|
.env
|
||||||
.env.*
|
.DS_Store
|
||||||
!.env.example
|
Dockerfile
|
||||||
|
.dockerignore
|
||||||
@@ -1,24 +1,27 @@
|
|||||||
# Dockerfile
|
# Multi-stage build
|
||||||
FROM node:18-alpine
|
FROM node:20-alpine AS builder
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Копируем package files
|
|
||||||
COPY package*.json ./
|
COPY package*.json ./
|
||||||
COPY nuxt.config.ts ./
|
|
||||||
COPY tsconfig.json ./
|
|
||||||
|
|
||||||
# Устанавливаем зависимости
|
|
||||||
RUN npm ci
|
RUN npm ci
|
||||||
|
|
||||||
# Копируем исходный код
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
# Собираем приложение
|
|
||||||
RUN npm run build
|
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
|
EXPOSE 3000
|
||||||
|
|
||||||
# Запускаем приложение
|
CMD ["node", ".output/server/index.mjs"]
|
||||||
CMD ["npm", "run", "start"]
|
|
||||||
Reference in New Issue
Block a user