Files
core/Dockerfile

38 lines
884 B
Docker
Raw Normal View History

FROM ghcr.io/astral-sh/uv:python3.13-bookworm-slim
2025-02-10 19:10:13 +03:00
RUN apt-get update && apt-get install -y \
postgresql-client \
git \
2025-02-10 19:10:13 +03:00
curl \
2025-05-18 22:43:20 +00:00
build-essential \
2025-05-26 09:39:59 +03:00
gnupg \
ca-certificates \
2025-02-10 19:10:13 +03:00
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Install only transitive deps first (cache-friendly layer)
COPY pyproject.toml .
COPY uv.lock .
RUN uv sync --no-install-project
# Add project sources and finalize env
COPY . .
RUN uv sync --no-editable
2025-05-26 09:39:59 +03:00
# Установка Node.js LTS и npm
RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - && \
2025-08-01 12:00:09 +03:00
apt-get install -y nsolid \
2025-05-26 09:40:15 +03:00
&& rm -rf /var/lib/apt/lists/*
2025-05-26 09:39:59 +03:00
2025-08-01 12:02:03 +03:00
RUN npm upgrade -g npm
2025-05-26 10:04:22 +03:00
COPY package.json package-lock.json ./
2025-05-26 10:47:33 +03:00
RUN npm ci
2025-02-10 19:10:13 +03:00
COPY . .
2025-05-26 10:47:33 +03:00
RUN npm run build
RUN pip install -r requirements.txt
2025-05-26 09:39:59 +03:00
2025-03-20 12:33:27 +03:00
EXPOSE 8000
2025-03-20 12:24:30 +03:00
CMD ["python", "-m", "granian", "main:app", "--interface", "asgi", "--host", "0.0.0.0", "--port", "8000"]