minhvh commited on
Commit
d3d04b2
·
verified ·
1 Parent(s): bc4eac6

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +23 -0
Dockerfile ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM postgres:17-alpine
2
+
3
+ # Cài đặt dependencies cần thiết
4
+ RUN apk add --no-cache bash
5
+
6
+ # Copy script khởi động
7
+ COPY start.sh /start.sh
8
+ RUN chmod +x /start.sh
9
+
10
+ # Thiết lập biến môi trường mặc định
11
+ ENV POSTGRES_DB=hf_db
12
+ ENV POSTGRES_USER=hf_user
13
+ ENV POSTGRES_PASSWORD=hf_password
14
+ ENV PGUSER=postgres
15
+
16
+ # Tạo thư mục làm việc
17
+ WORKDIR /app
18
+
19
+ # Expose port 7860 (port của HF Spaces)
20
+ EXPOSE 7860
21
+
22
+ # Sử dụng script khởi động tùy chỉnh
23
+ CMD ["/start.sh"]