File size: 939 Bytes
369fac9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
FROM python:3.8

# Install Node.js and npm
RUN apt-get update && apt-get install -y curl && \
    curl -sL https://deb.nodesource.com/setup_16.x | bash - && \
    apt-get install -y nodejs \
    npm

RUN apt-get update && apt-get install -y rsync
RUN apt-get update && apt-get install ffmpeg libsm6 libxext6  -y

RUN export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1

# Set the working directory to /app
WORKDIR /app

# Copy the requirements file into the container
COPY requirements.txt .

# Install any needed packages specified in requirements.txt
RUN pip install --no-cache-dir -r requirements.txt

# copy /web folder and install client's dependencies
COPY ./web /app
WORKDIR /app
RUN npm run install:client
RUN npm run build-deploy:client

# Expose port 8000 for the Django server
EXPOSE 8000

# Start the server
CMD ["python", "server/manage.py", "runserver", "0.0.0.0:8000"]