Files
iiEasy/iiEasy/Dockerfile

42 lines
1.0 KiB
Docker
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
FROM node:20-alpine
# Устанавливаем ВСЕ нужные системные зависимости (для sharp, sqlite и сборки)
RUN apk update && apk add --no-cache \
build-base \
gcc \
autoconf \
automake \
zlib-dev \
libpng-dev \
nasm \
bash \
vips-dev \
python3 \
make \
g++
WORKDIR /opt/app
# Копируем файлы зависимостей
COPY package.json package-lock.json* yarn.lock* ./
# Устанавливаем зависимости (используем ci для стабильности)
RUN npm ci --omit=dev
# Копируем весь код проекта
COPY . .
# Публичный URL для админки (запросы из браузера идут на этот origin)
ARG STRAPI_ADMIN_BACKEND_URL
ENV STRAPI_ADMIN_BACKEND_URL=${STRAPI_ADMIN_BACKEND_URL}
# Собираем админку Strapi
ENV NODE_ENV=production
RUN npm run build
# Открываем порт
EXPOSE 1340
# Запуск
CMD ["npm", "run", "start"]