Spaces:
Running
Running
Upload 4 files
Browse files- Dockerfile (1) +30 -0
- server.js +75 -0
- sh.sh +1 -0
- start (3).sh +1 -0
Dockerfile (1)
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Use the Node.js 20 base image
|
2 |
+
FROM node:20
|
3 |
+
|
4 |
+
# Update system packages and install FFmpeg
|
5 |
+
RUN apt-get update && apt-get install -y ffmpeg && apt-get clean
|
6 |
+
|
7 |
+
# Switch to non-root user
|
8 |
+
USER node
|
9 |
+
|
10 |
+
# Clone the repository
|
11 |
+
RUN git clone https://github.com/BASHER0706/bookie /home/node/blue
|
12 |
+
|
13 |
+
# Set the working directory
|
14 |
+
WORKDIR /home/node/blue
|
15 |
+
|
16 |
+
# Grant full permissions to the directory (optional but helps with permissions)
|
17 |
+
RUN chmod -R 777 /home/node/blue/
|
18 |
+
|
19 |
+
# Install dependencies
|
20 |
+
RUN yarn install && yarn add http
|
21 |
+
|
22 |
+
# Copy server and start script into the directory
|
23 |
+
COPY server.js .
|
24 |
+
COPY start.sh .
|
25 |
+
|
26 |
+
# Verify FFmpeg installation and print directory contents (for debugging purposes)
|
27 |
+
RUN ffmpeg -version && ls -la /home/node/blue
|
28 |
+
|
29 |
+
# Run the start script
|
30 |
+
CMD ["bash", "start.sh"]
|
server.js
ADDED
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
const http = require('http');
|
2 |
+
|
3 |
+
|
4 |
+
http.createServer((req, res) => {
|
5 |
+
|
6 |
+
res.writeHead(200, {'Content-Type': 'text/html'});
|
7 |
+
|
8 |
+
res.end(`
|
9 |
+
<!DOCTYPE html>
|
10 |
+
<html lang="en">
|
11 |
+
<head>
|
12 |
+
<meta charset="UTF-8">
|
13 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
14 |
+
<title>The Bookie Basher</title>
|
15 |
+
<style>
|
16 |
+
body {
|
17 |
+
display: flex;
|
18 |
+
flex-direction: column;
|
19 |
+
justify-content: center;
|
20 |
+
align-items: center;
|
21 |
+
height: 100vh;
|
22 |
+
background: linear-gradient(135deg, #72EDF2 10%, #5151E5 100%);
|
23 |
+
margin: 0;
|
24 |
+
font-family: 'Arial', sans-serif;
|
25 |
+
}
|
26 |
+
.marquee {
|
27 |
+
font-size: 2em;
|
28 |
+
font-weight: bold;
|
29 |
+
color: white;
|
30 |
+
text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
|
31 |
+
overflow: hidden;
|
32 |
+
white-space: nowrap;
|
33 |
+
position: relative;
|
34 |
+
animation: marquee 10s linear infinite;
|
35 |
+
}
|
36 |
+
@keyframes marquee {
|
37 |
+
0% { transform: translateX(100%); }
|
38 |
+
100% { transform: translateX(-100%); }
|
39 |
+
}
|
40 |
+
.button-container {
|
41 |
+
margin-top: 20px;
|
42 |
+
}
|
43 |
+
.button {
|
44 |
+
background-color: #ffffff;
|
45 |
+
color: #5151E5;
|
46 |
+
border: 2px solid #5151E5;
|
47 |
+
padding: 10px 20px;
|
48 |
+
text-align: center;
|
49 |
+
text-decoration: none;
|
50 |
+
display: inline-block;
|
51 |
+
font-size: 1em;
|
52 |
+
font-weight: bold;
|
53 |
+
border-radius: 5px;
|
54 |
+
transition: background-color 0.3s, color 0.3s;
|
55 |
+
}
|
56 |
+
.button:hover {
|
57 |
+
background-color: #5151E5;
|
58 |
+
color: #ffffff;
|
59 |
+
}
|
60 |
+
</style>
|
61 |
+
</head>
|
62 |
+
<body>
|
63 |
+
<div class="marquee">The Bookie Basher</div>
|
64 |
+
<div class="button-container">
|
65 |
+
<a href="https://www.youtube.com/c/CarlTech?sub_confirmation=1" target="_blank" class="button">LEARN MORE HERE</a>
|
66 |
+
</div>
|
67 |
+
</body>
|
68 |
+
</html>
|
69 |
+
`);
|
70 |
+
|
71 |
+
}).listen(7860, () => {
|
72 |
+
|
73 |
+
console.log('Server listening on port 7860');
|
74 |
+
|
75 |
+
});
|
sh.sh
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
pip install datasets huggingface_hub
|
start (3).sh
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
node server.js & npm start
|