Upload Dockerfile
Browse files- Dockerfile +36 -0
Dockerfile
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM node:16-slim
|
2 |
+
|
3 |
+
# Define build argument for branch
|
4 |
+
ARG BRANCH=main
|
5 |
+
|
6 |
+
# Install git, Python and pip
|
7 |
+
RUN apt-get update && \
|
8 |
+
apt-get install -y git python3 python3-pip && \
|
9 |
+
pip3 install requests && \
|
10 |
+
rm -rf /var/lib/apt/lists/*
|
11 |
+
|
12 |
+
WORKDIR /app
|
13 |
+
|
14 |
+
# Clone the repository and checkout specified branch
|
15 |
+
RUN git clone https://github.com/mccoy88f/OMG-Premium-TV.git . && \
|
16 |
+
git checkout ${BRANCH}
|
17 |
+
|
18 |
+
# Install dependencies
|
19 |
+
RUN npm install
|
20 |
+
|
21 |
+
# Create directories for Python scripts and generated playlists
|
22 |
+
RUN mkdir -p /app/temp && \
|
23 |
+
chmod 777 /app/temp
|
24 |
+
RUN chmod 777 /app
|
25 |
+
|
26 |
+
|
27 |
+
|
28 |
+
# Expose the port (Hugging Face uses 7860)
|
29 |
+
EXPOSE 7860
|
30 |
+
|
31 |
+
# Set essential environment variables for Hugging Face
|
32 |
+
ENV PORT=7860
|
33 |
+
ENV HOST=0.0.0.0
|
34 |
+
|
35 |
+
# Start the application
|
36 |
+
CMD ["node", "index.js"]
|