Fabio76 commited on
Commit
1d948cd
·
verified ·
1 Parent(s): 2f2d4f0

Update Dockerfile

Browse files
Files changed (1) hide show
  1. 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
- # Copy the current directory contents into the container at /app
18
- COPY . /app
 
 
 
19
 
20
  # Install Python dependencies
21
- RUN pip install --no-cache-dir -r /app/requirements.txt
22
 
23
- # Install Docker Compose
24
- RUN curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose \
25
- && chmod +x /usr/local/bin/docker-compose
26
 
27
  # Expose port 80 to the outside world
28
  EXPOSE 80
29
 
30
- # Run the application
31
- CMD ["docker-compose", "up"]
 
 
 
 
 
 
 
 
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