Update Dockerfile
Browse files- Dockerfile +17 -9
Dockerfile
CHANGED
|
@@ -10,22 +10,30 @@ RUN apt-get update && apt-get install -y \
|
|
| 10 |
libpq-dev \
|
| 11 |
curl \
|
| 12 |
git \
|
| 13 |
-
docker.io \
|
| 14 |
&& apt-get clean \
|
| 15 |
&& rm -rf /var/lib/apt/lists/*
|
| 16 |
|
| 17 |
-
#
|
| 18 |
-
|
|
|
|
|
|
|
|
|
|
| 19 |
|
| 20 |
# Install Python dependencies
|
| 21 |
-
RUN pip install --no-cache-dir -r
|
| 22 |
|
| 23 |
-
#
|
| 24 |
-
|
| 25 |
-
&& chmod +x /usr/local/bin/docker-compose
|
| 26 |
|
| 27 |
# Expose port 80 to the outside world
|
| 28 |
EXPOSE 80
|
| 29 |
|
| 30 |
-
#
|
| 31 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
libpq-dev \
|
| 11 |
curl \
|
| 12 |
git \
|
|
|
|
| 13 |
&& apt-get clean \
|
| 14 |
&& rm -rf /var/lib/apt/lists/*
|
| 15 |
|
| 16 |
+
# Clone the Dify repository
|
| 17 |
+
RUN git clone https://github.com/langgenius/dify.git /app
|
| 18 |
+
|
| 19 |
+
# Set the working directory to the directory containing requirements.txt
|
| 20 |
+
WORKDIR /app/api # Assuming requirements.txt is in the 'api' folder
|
| 21 |
|
| 22 |
# Install Python dependencies
|
| 23 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 24 |
|
| 25 |
+
# Set the working directory back to the app root
|
| 26 |
+
WORKDIR /app
|
|
|
|
| 27 |
|
| 28 |
# Expose port 80 to the outside world
|
| 29 |
EXPOSE 80
|
| 30 |
|
| 31 |
+
# Define environment variables for database and other services
|
| 32 |
+
ENV POSTGRES_USER=postgres
|
| 33 |
+
ENV POSTGRES_PASSWORD=example
|
| 34 |
+
ENV POSTGRES_DB=dify
|
| 35 |
+
ENV REDIS_HOST=redis
|
| 36 |
+
ENV WEAVIATE_HOST=weaviate
|
| 37 |
+
|
| 38 |
+
# Start the application
|
| 39 |
+
CMD ["python", "api/app.py"] # Update this line to the correct start command for your application
|