Update Dockerfile
Browse files- Dockerfile +4 -3
Dockerfile
CHANGED
|
@@ -69,11 +69,13 @@ WORKDIR /app
|
|
| 69 |
|
| 70 |
COPY --from=builder /opt/venv /opt/venv
|
| 71 |
|
|
|
|
| 72 |
COPY pyproject.toml config.defaults.toml ./
|
|
|
|
| 73 |
COPY app ./app
|
| 74 |
COPY scripts ./scripts
|
| 75 |
|
| 76 |
-
#
|
| 77 |
RUN mkdir -p /app/data /app/logs \
|
| 78 |
&& chmod +x /app/scripts/entrypoint.sh /app/scripts/init_storage.sh
|
| 79 |
|
|
@@ -83,5 +85,4 @@ HEALTHCHECK --interval=30s --timeout=5s --start-period=15s --retries=3 \
|
|
| 83 |
CMD ["sh", "-c", "wget -qO /dev/null http://127.0.0.1:${SERVER_PORT}/health || exit 1"]
|
| 84 |
|
| 85 |
ENTRYPOINT ["/app/scripts/entrypoint.sh"]
|
| 86 |
-
|
| 87 |
-
CMD ["sh", "-c", "sed -i \"s/SECRET_PASSWORD_PLACEHOLDER/${APP_ACCESS_PASSWORD}/g\" config.defaults.toml 2>/dev/null; sed -i \"s/SECRET_PASSWORD_PLACEHOLDER/${APP_ACCESS_PASSWORD}/g\" /app/data/config.toml 2>/dev/null; exec granian --interface asgi --host ${SERVER_HOST} --port ${SERVER_PORT} --workers ${SERVER_WORKERS} app.main:app"]
|
|
|
|
| 69 |
|
| 70 |
COPY --from=builder /opt/venv /opt/venv
|
| 71 |
|
| 72 |
+
# 🌟 关键修复点:加了通配符后,编译时如果有加密包就会打包进去,如果没有也会安全跳过不报错
|
| 73 |
COPY pyproject.toml config.defaults.toml ./
|
| 74 |
+
COPY accounts.db.enc* ./
|
| 75 |
COPY app ./app
|
| 76 |
COPY scripts ./scripts
|
| 77 |
|
| 78 |
+
# 恢复真实的本地物理目录,让你的启动脚本能够顺利 mkdir 顺利通过
|
| 79 |
RUN mkdir -p /app/data /app/logs \
|
| 80 |
&& chmod +x /app/scripts/entrypoint.sh /app/scripts/init_storage.sh
|
| 81 |
|
|
|
|
| 85 |
CMD ["sh", "-c", "wget -qO /dev/null http://127.0.0.1:${SERVER_PORT}/health || exit 1"]
|
| 86 |
|
| 87 |
ENTRYPOINT ["/app/scripts/entrypoint.sh"]
|
| 88 |
+
CMD ["sh", "-c", "exec granian --interface asgi --host ${SERVER_HOST} --port ${SERVER_PORT} --workers ${SERVER_WORKERS} app.main:app"]
|
|
|