-
Notifications
You must be signed in to change notification settings - Fork 57
Expand file tree
/
Copy pathDockerfile
More file actions
37 lines (25 loc) · 839 Bytes
/
Dockerfile
File metadata and controls
37 lines (25 loc) · 839 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Stage 1: Node.js builder
FROM node:10 AS builder
# Setup volume
WORKDIR /app
# Install packages
ADD package.json .
RUN npm install
COPY . .
RUN export PATH=./node_modules/.bin:$PATH && npm run build-stylus && npm run build-riot && npm run concat-riot
# Stage 2: Python/Django
FROM python:3.9.20
# Install system dependencies
RUN apt-get update && apt-get install -y gcc build-essential && rm -rf /var/lib/apt/lists/*
ENV PYTHONUNBUFFERED=1
ENV PATH=$PATH:/root/.local/bin
RUN curl -sSL https://install.python-poetry.org | python3 - --version 1.8.3
RUN poetry config virtualenvs.create false
RUN poetry config virtualenvs.in-project false
WORKDIR /app
COPY pyproject.toml poetry.lock ./
RUN poetry install
COPY . /app
# Copy built files from builder stage
COPY --from=builder /app /app
RUN ./manage.py collectstatic --noinput