Update Dockerfile
Browse files- Dockerfile +21 -12
Dockerfile
CHANGED
|
@@ -24,29 +24,38 @@ COPY --from=builder /usr/src/app/target/release/websurfx /usr/local/bin/websurfx
|
|
| 24 |
# Public folder copy karna
|
| 25 |
COPY --from=builder /usr/src/app/public /app/public
|
| 26 |
|
| 27 |
-
#
|
| 28 |
-
RUN mkdir -p /app/colorschemes
|
| 29 |
|
| 30 |
-
#
|
| 31 |
-
RUN
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
RUN echo 'port = 7860\n\
|
| 35 |
bind_address = "0.0.0.0"\n\
|
| 36 |
threads = 2\n\
|
| 37 |
logging = true\n\
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
\n\
|
| 39 |
search = {\n\
|
| 40 |
safe_search = 0\n\
|
| 41 |
}\n\
|
| 42 |
\n\
|
| 43 |
engines = {\n\
|
| 44 |
-
google =
|
| 45 |
-
duckduckgo =
|
| 46 |
-
bing =
|
| 47 |
-
}' > /app/websurfx/config.lua
|
|
|
|
|
|
|
|
|
|
|
|
|
| 48 |
|
| 49 |
-
#
|
| 50 |
RUN chmod -R 777 /app
|
| 51 |
|
| 52 |
# Port Expose karna
|
|
|
|
| 24 |
# Public folder copy karna
|
| 25 |
COPY --from=builder /usr/src/app/public /app/public
|
| 26 |
|
| 27 |
+
# Config folders banana
|
| 28 |
+
RUN mkdir -p /app/websurfx /app/colorschemes
|
| 29 |
|
| 30 |
+
# SMART SCRIPT: Repo ki original config dhoondna, warna Number (u8) format mein nayi banana
|
| 31 |
+
RUN find /usr/src/app -type f -name "config.lua" -exec cp {} /app/websurfx/config.lua \; -quit && \
|
| 32 |
+
if [ ! -f /app/websurfx/config.lua ]; then \
|
| 33 |
+
echo 'port = "7860"\n\
|
|
|
|
| 34 |
bind_address = "0.0.0.0"\n\
|
| 35 |
threads = 2\n\
|
| 36 |
logging = true\n\
|
| 37 |
+
timeout = 15\n\
|
| 38 |
+
\n\
|
| 39 |
+
style = {\n\
|
| 40 |
+
theme = "simple",\n\
|
| 41 |
+
colorscheme = "catppuccin-mocha"\n\
|
| 42 |
+
}\n\
|
| 43 |
\n\
|
| 44 |
search = {\n\
|
| 45 |
safe_search = 0\n\
|
| 46 |
}\n\
|
| 47 |
\n\
|
| 48 |
engines = {\n\
|
| 49 |
+
google = 1,\n\
|
| 50 |
+
duckduckgo = 1,\n\
|
| 51 |
+
bing = 1\n\
|
| 52 |
+
}' > /app/websurfx/config.lua; \
|
| 53 |
+
fi
|
| 54 |
+
|
| 55 |
+
# Hugging Face ke liye port hamesha 7860 hona chahiye
|
| 56 |
+
RUN sed -i 's/port = .*/port = "7860"/' /app/websurfx/config.lua
|
| 57 |
|
| 58 |
+
# Permissions theek karna
|
| 59 |
RUN chmod -R 777 /app
|
| 60 |
|
| 61 |
# Port Expose karna
|