kumar-aditya commited on
Commit
da09993
·
verified ·
1 Parent(s): d239c9c

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +33 -0
Dockerfile ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Base image
2
+ FROM ubuntu:22.04
3
+
4
+ ENV DEBIAN_FRONTEND=noninteractive
5
+
6
+ # Install dependencies
7
+ RUN apt-get update && apt-get install -y \
8
+ python3 python3-pip python3-venv \
9
+ nodejs npm \
10
+ redis-server postgresql postgresql-contrib \
11
+ supervisor git curl \
12
+ && rm -rf /var/lib/apt/lists/*
13
+
14
+ # Clone Dify
15
+ WORKDIR /app
16
+ RUN git clone https://github.com/langgenius/dify.git .
17
+
18
+ # Setup Python backend
19
+ WORKDIR /app/api
20
+ RUN pip install -r requirements.txt
21
+
22
+ # Setup frontend
23
+ WORKDIR /app/web
24
+ RUN npm install && npm run build
25
+
26
+ # Setup Supervisor config
27
+ WORKDIR /app
28
+ COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
29
+
30
+ # Expose ports
31
+ EXPOSE 80 5001
32
+
33
+ CMD ["/usr/bin/supervisord"]