forked from mblayman/homeschool
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
36 lines (28 loc) · 852 Bytes
/
Dockerfile
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
# Use an official Python runtime as a parent image
FROM python:3.12-slim
# Sets the docker container's working directory
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
libpq-dev \
build-essential \
libgraphviz-dev \
libffi-dev \
nodejs \
npm \
&& rm -rf /var/lib/apt/lists/*
# Install Python dependencies
COPY requirements.txt requirements-dev.txt /app/
RUN CFLAGS="-I/usr/include/graphviz" \
LDFLAGS="-L/usr/lib/graphviz" \
pip install -r requirements-dev.txt -r requirements.txt
# Install JS packages
COPY package.json package-lock.json /app/
RUN npm install
# Add the rest of the code
COPY . /app
RUN chmod +x /app/docker-entrypoint.sh
# Define environment variable
ENV PYTHONUNBUFFERED 1
# Run migrations and start server
ENTRYPOINT ["/app/docker-entrypoint.sh"]