File size: 1,068 Bytes
6dfd5ec
 
 
 
 
 
a086974
6dfd5ec
 
 
 
a086974
0fa2a84
6dfd5ec
 
614ee6e
 
 
 
0df3926
 
 
 
 
 
 
 
1d948cd
6dfd5ec
 
 
1d948cd
 
 
 
 
 
 
 
 
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
38
39
40
41
# Use the official Python image
FROM python:3.10-slim

# Set the working directory in the container
WORKDIR /app

# Install system dependencies
RUN apt-get update && apt-get install -y \
    build-essential \
    libpq-dev \
    curl \
    git \
    && apt-get clean \
    && rm -rf /var/lib/apt/lists/*

# Copy the requirements file and install Python dependencies
COPY requirements.txt /app/
RUN pip install --no-cache-dir -r /app/requirements.txt

# Create a subdirectory for the Dify repository
RUN mkdir /app/dify

# Clone the Dify repository into the subdirectory
RUN git clone https://github.com/langgenius/dify.git /app/dify

# Set the working directory to the cloned repository
WORKDIR /app/dify

# Expose port 80 to the outside world
EXPOSE 80

# Define environment variables for database and other services
ENV POSTGRES_USER=postgres
ENV POSTGRES_PASSWORD=example
ENV POSTGRES_DB=dify
ENV REDIS_HOST=redis
ENV WEAVIATE_HOST=weaviate

# Start the application
CMD ["python", "api/app.py"]  # Update this line to the correct start command for your application