master
jinql 2025-09-04 23:13:16 +08:00
parent 0b1c3fddcd
commit 407c803550
2 changed files with 15 additions and 7 deletions

View File

@ -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
- /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

View File

@ -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"