2ch commited on
Commit
a130a5b
·
verified ·
1 Parent(s): e19bcea

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -8
Dockerfile CHANGED
@@ -1,4 +1,5 @@
1
  FROM archlinux:base
 
2
  WORKDIR /app
3
  RUN pacman -Syu --noconfirm && \
4
  pacman -S --noconfirm curl git bun && \
@@ -24,11 +25,13 @@ COPY <<-"EOF" /app/.env
24
  PORT=7860
25
  HOST=0.0.0.0
26
  DEFAULT_MODEL=gemini-2.5-flash
27
- LOG_LEVEL=debug
28
  LS_BINARY_PATH=/opt/windsurf/language_server_linux_x64
29
  LS_PORT=42100
30
- DASHBOARD_PASSWORD=admin
31
- API_KEY=
 
 
32
  EOF
33
 
34
  COPY <<-"EOF" /tmp/patch.js
@@ -43,7 +46,7 @@ if (rawTokens) {
43
  try {
44
  const response = await fetch(`http://localhost:${config.port}/auth/login`, {
45
  method: 'POST',
46
- headers: {'Content-Type': 'application/json'},
47
  body: JSON.stringify({token})
48
  });
49
  const maskedToken = `...${token.slice(-4)}`;
@@ -64,9 +67,5 @@ EOF
64
  RUN sed -i -e '/const server = startServer();/r /tmp/patch.js' -e '/const server = startServer();/d' /app/src/index.js && \
65
  rm /tmp/patch.js
66
 
67
- RUN cat /app/resolv.conf && echo -e "\n===================\n" && \
68
- cat /entrypoint.sh && echo -e "\n===================\n" && \
69
- cat /app/.env
70
-
71
  ENTRYPOINT ["/entrypoint.sh"]
72
  CMD ["bun", "/app/src/index.js"]
 
1
  FROM archlinux:base
2
+
3
  WORKDIR /app
4
  RUN pacman -Syu --noconfirm && \
5
  pacman -S --noconfirm curl git bun && \
 
25
  PORT=7860
26
  HOST=0.0.0.0
27
  DEFAULT_MODEL=gemini-2.5-flash
28
+ LOG_LEVEL=warning
29
  LS_BINARY_PATH=/opt/windsurf/language_server_linux_x64
30
  LS_PORT=42100
31
+ # это вынесено в секреты на вкладке настроек:
32
+ # DASHBOARD_PASSWORD
33
+ # API_KEY
34
+ # AUTO_LOGIN_TOKENS
35
  EOF
36
 
37
  COPY <<-"EOF" /tmp/patch.js
 
46
  try {
47
  const response = await fetch(`http://localhost:${config.port}/auth/login`, {
48
  method: 'POST',
49
+ headers: {'Content-Type': 'application/json', 'Authorization': `Bearer ${process.env.API_KEY}`},
50
  body: JSON.stringify({token})
51
  });
52
  const maskedToken = `...${token.slice(-4)}`;
 
67
  RUN sed -i -e '/const server = startServer();/r /tmp/patch.js' -e '/const server = startServer();/d' /app/src/index.js && \
68
  rm /tmp/patch.js
69
 
 
 
 
 
70
  ENTRYPOINT ["/entrypoint.sh"]
71
  CMD ["bun", "/app/src/index.js"]