From c1ec2aee5b790f840f2c614f7d3d55cf1fa96ab4 Mon Sep 17 00:00:00 2001 From: keven1024 Date: Sat, 30 Aug 2025 18:26:35 +0800 Subject: [PATCH] chore: update .env.example for Redis configuration and add docker-compose file for app, worker, and Redis services --- .env.example | 2 +- docker-compose.yml | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 docker-compose.yml diff --git a/.env.example b/.env.example index f89079e..eecdc30 100644 --- a/.env.example +++ b/.env.example @@ -3,7 +3,7 @@ DOWNLOAD_SECRET="your-secret-token" PASSWORD_SALT="your-passwall-salt" # 设置密码时会把密码加盐 UPLOAD_PATH="/upload" # 上传路径 -REDIS_URL="redis://127.0.0.1:6379/0" # redis 地址 +REDIS_URL="redis://redis:6379/0" # redis 地址 NODE_ENV="production" # 指定系统环境 production 或者 dev MAX_LOCALSTORAGE_SIZE="100GB" # 指定实例最大上传容量,支持填写人类可读的值,比如1TB,500GB等 diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..a5a5094 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,24 @@ +services: + app: + image: fudaoyuanicu/015-app:latest + container_name: 015-app + volumes: + - ./uploads:/uploads + ports: + - "8080:80" + env_file: '.env' + depends_on: + - redis + + worker: + image: fudaoyuanicu/015-worker:latest + container_name: worker + env_file: '.env' + volumes: + - ./uploads:/uploads + depends_on: + - app + - redis + redis: + image: redis:7 + container_name: redis \ No newline at end of file