fix env (#169)
Browse files- .container/Dockerfile +3 -2
- .container/docker-compose.yml +1 -1
.container/Dockerfile
CHANGED
@@ -76,8 +76,6 @@ COPY assets/ ./assets/
|
|
76 |
COPY README.md .
|
77 |
COPY README_zh.md .
|
78 |
|
79 |
-
# 设置环境变量文件 | Set environment variables file
|
80 |
-
COPY owl/.env_template ./owl/.env
|
81 |
|
82 |
# 创建启动脚本 | Create startup script
|
83 |
RUN echo '#!/bin/bash\nxvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" python "$@"' > /usr/local/bin/xvfb-python && \
|
@@ -93,7 +91,10 @@ WORKDIR /app/owl
|
|
93 |
# 设置适当的权限 | Set appropriate permissions
|
94 |
RUN chown -R owl:owl /app
|
95 |
RUN mkdir -p /root/.cache && chown -R owl:owl /root/.cache
|
|
|
96 |
|
|
|
|
|
97 |
# 切换到非root用户 | Switch to non-root user
|
98 |
# 注意:如果需要访问/dev/shm,可能仍需要root用户 | Note: If you need to access /dev/shm, you may still need root user
|
99 |
# USER owl
|
|
|
76 |
COPY README.md .
|
77 |
COPY README_zh.md .
|
78 |
|
|
|
|
|
79 |
|
80 |
# 创建启动脚本 | Create startup script
|
81 |
RUN echo '#!/bin/bash\nxvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" python "$@"' > /usr/local/bin/xvfb-python && \
|
|
|
91 |
# 设置适当的权限 | Set appropriate permissions
|
92 |
RUN chown -R owl:owl /app
|
93 |
RUN mkdir -p /root/.cache && chown -R owl:owl /root/.cache
|
94 |
+
RUN chmod 644 /app/owl/.env
|
95 |
|
96 |
+
|
97 |
+
USER owl
|
98 |
# 切换到非root用户 | Switch to non-root user
|
99 |
# 注意:如果需要访问/dev/shm,可能仍需要root用户 | Note: If you need to access /dev/shm, you may still need root user
|
100 |
# USER owl
|
.container/docker-compose.yml
CHANGED
@@ -11,7 +11,7 @@ services:
|
|
11 |
- python:3.10-slim
|
12 |
volumes:
|
13 |
# 挂载.env文件,方便配置API密钥 | Mount .env file for easy API key configuration
|
14 |
-
-
|
15 |
# 可选:挂载数据目录 | Optional: Mount data directory
|
16 |
- ./data:/app/data
|
17 |
# 挂载缓存目录,避免重复下载 | Mount cache directories to avoid repeated downloads
|
|
|
11 |
- python:3.10-slim
|
12 |
volumes:
|
13 |
# 挂载.env文件,方便配置API密钥 | Mount .env file for easy API key configuration
|
14 |
+
- ../owl/.env:/app/owl/.env
|
15 |
# 可选:挂载数据目录 | Optional: Mount data directory
|
16 |
- ./data:/app/data
|
17 |
# 挂载缓存目录,避免重复下载 | Mount cache directories to avoid repeated downloads
|