mirror of
https://github.com/koodo-reader/koodo-reader.git
synced 2026-05-19 14:14:09 -04:00
feat: refactor Docker configuration to utilize Docker Secrets for sensitive information management
This commit is contained in:
12
Dockerfile
12
Dockerfile
@@ -48,20 +48,8 @@ RUN echo '#!/bin/sh' > /start.sh && \
|
||||
ENV SERVER_USERNAME=admin
|
||||
ENV SERVER_PASSWORD=securePass123
|
||||
ENV SERVER_PASSWORD_FILE=my_secret
|
||||
ENV PORT=8080
|
||||
|
||||
# Define volume for uploads directory
|
||||
VOLUME ["/app/uploads"]
|
||||
|
||||
CMD ["/start.sh"]
|
||||
|
||||
# docker run -d \
|
||||
# --name koodo-reader \
|
||||
# -p 80:80 \
|
||||
# -p 8080:8080 \
|
||||
# -e ENABLE_HTTP_SERVER=false \
|
||||
# -e SERVER_USERNAME=admin \
|
||||
# -e SERVER_PASSWORD=securePass123 \
|
||||
# -e SERVER_PASSWORD_FILE=my_secret \
|
||||
# -v /path/to/host/uploads:/app/uploads \
|
||||
# ghcr.io/koodo-reader/koodo-reader:master
|
||||
|
||||
23
docker-compose-secret.yml
Normal file
23
docker-compose-secret.yml
Normal file
@@ -0,0 +1,23 @@
|
||||
version: "3.8"
|
||||
# This docker-compose file uses secrets to manage sensitive information like passwords.
|
||||
services:
|
||||
koodo-reader:
|
||||
image: ghcr.io/koodo-reader/koodo-reader:master
|
||||
container_name: koodo-reader
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "80:80"
|
||||
- "8080:8080"
|
||||
environment:
|
||||
- SERVER_USERNAME=${SERVER_USERNAME:-admin}
|
||||
- SERVER_PASSWORD=${SERVER_PASSWORD:-securePass123}
|
||||
- SERVER_PASSWORD_FILE=${SERVER_PASSWORD_FILE:-my_secret}
|
||||
- ENABLE_HTTP_SERVER=false
|
||||
volumes:
|
||||
# 使用主机目录(推荐)
|
||||
- /opt/uploads:/app/uploads
|
||||
secrets:
|
||||
- my_secret
|
||||
secrets:
|
||||
my_secret:
|
||||
file: ./my_secret.txt
|
||||
@@ -11,8 +11,6 @@ services:
|
||||
environment:
|
||||
- SERVER_USERNAME=${SERVER_USERNAME:-admin}
|
||||
- SERVER_PASSWORD=${SERVER_PASSWORD:-securePass123}
|
||||
- SERVER_PASSWORD_FILE=${SERVER_PASSWORD_FILE:-my_secret}
|
||||
- PORT=8080
|
||||
- ENABLE_HTTP_SERVER=false
|
||||
volumes:
|
||||
# 使用主机目录(推荐)
|
||||
|
||||
2
src/assets/lib/kookit-extra-browser.min.js
vendored
2
src/assets/lib/kookit-extra-browser.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
src/assets/lib/kookit.min.js
vendored
2
src/assets/lib/kookit.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -85,7 +85,7 @@ class Background extends React.Component<BackgroundProps, BackgroundState> {
|
||||
ConfigService.getReaderConfig("isOSNight") === "yes")
|
||||
? "rgba(44,47,49,1)"
|
||||
: "rgba(255,255,255,1)",
|
||||
filter: `brightnessbrightness(${
|
||||
filter: `brightness(${
|
||||
ConfigService.getReaderConfig("brightness") || 1
|
||||
}) invert(${
|
||||
ConfigService.getReaderConfig("isInvert") === "yes" ? 1 : 0
|
||||
|
||||
@@ -174,7 +174,9 @@ class Viewer extends React.Component<ViewerProps, ViewerState> {
|
||||
ConfigService.getReaderConfig("isSliding") === "yes" ? "sliding" : "",
|
||||
ConfigService.getReaderConfig("convertChinese"),
|
||||
"",
|
||||
"no",
|
||||
ConfigService.getReaderConfig("backgroundColor") === "rgba(44,47,49,1)"
|
||||
? "yes"
|
||||
: "no",
|
||||
"no",
|
||||
Kookit
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user