From 407c8035501c24502850062fffa89b9d39112f5e Mon Sep 17 00:00:00 2001 From: jinql Date: Thu, 4 Sep 2025 23:13:16 +0800 Subject: [PATCH] 25.09.04 --- docker-compose.yml | 18 +++++++++++++----- entrypoint.sh | 4 ++-- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 0b7169c..fbf0c9b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,8 +1,16 @@ services: - web: - build: . + favicon-api: + image: favicon-api:latest + container_name: favicon-api ports: - - "8000:8000" + - 8001:8000 + environment: + TZ: Asia/Shanghai volumes: - - .:/app - command: uvicorn main:app --host 0.0.0.0 --port 8000 --reload \ No newline at end of file + - /usr/share/zoneinfo/Asia/Shanghai:/usr/share/zoneinfo/Asia/Shanghai:ro + - /etc/localtime:/etc/localtime:ro + - /etc/timezone:/etc/timezone:ro + - ./data:/app/data:rw + - ./conf:/app/conf:rw + - ./logs:/app/logs:rw + restart: unless-stopped \ No newline at end of file diff --git a/entrypoint.sh b/entrypoint.sh index cf6d02f..9ec7597 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -13,7 +13,7 @@ if [ ! -f "$gunicorn_conf" ]; then if [ -f "$default_conf_dir/gunicorn_conf_py" ]; then cp "$default_conf_dir/gunicorn_conf_py" "$gunicorn_conf" chmod 644 "$gunicorn_conf" - echo "成功复制gunicorn.conf.py" + echo "复制gunicorn.conf.py成功" else echo "警告:默认配置文件 $default_conf_dir/gunicorn_conf_py 不存在,创建空文件" touch "$gunicorn_conf" @@ -26,7 +26,7 @@ if [ ! -f "$logging_conf" ]; then if [ -f "$default_conf_dir/logging.yaml" ]; then cp "$default_conf_dir/logging.yaml" "$logging_conf" chmod 644 "$logging_conf" - echo "成功复制logging.yaml" + echo "复制logging.yaml成功" else echo "警告:默认配置文件 $default_conf_dir/logging.yaml 不存在,创建空文件" touch "$logging_conf"