From f65544554e44e255dcb1aea17ebaf0fe54d63db6 Mon Sep 17 00:00:00 2001 From: xiaoz Date: Fri, 16 Jan 2026 09:11:53 +0800 Subject: [PATCH] update --- .env => .env.example | 2 +- compose-cn.yaml | 82 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 83 insertions(+), 1 deletion(-) rename .env => .env.example (78%) create mode 100644 compose-cn.yaml diff --git a/.env b/.env.example similarity index 78% rename from .env rename to .env.example index 171455e..3eb4a17 100644 --- a/.env +++ b/.env.example @@ -1,4 +1,4 @@ -BASE_URL=https://zpic.rss.ink:8443 +BASE_URL=https://zpic.demo.mba DB_USER=zpic_user DB_PASSWORD=ZR8e0b2G4eIp diff --git a/compose-cn.yaml b/compose-cn.yaml new file mode 100644 index 0000000..8802947 --- /dev/null +++ b/compose-cn.yaml @@ -0,0 +1,82 @@ +services: + zpic: + container_name: zpic + image: helloz/zpic + networks: + - mynet + ports: + - "2080:2080" + volumes: + - ./zpic/data:/opt/zpic/app/data + env_file: + - .env + # 环境变量 + environment: + - WORKERS=2 + depends_on: + - postgres + - redis + restart: always + + postgres: + container_name: postgres + image: postgres:17-bookworm + restart: unless-stopped + environment: + - POSTGRES_DB=${DB_NAME} + - POSTGRES_USER=${DB_USER} + - POSTGRES_PASSWORD=${DB_PASSWORD} + volumes: + - ./pgsql/data:/var/lib/postgresql/data + - ./pgsql/postgres.conf:/etc/postgresql/postgresql.conf:ro + command: ["postgres", "-c", "config_file=/etc/postgresql/postgresql.conf"] + ports: + - "127.0.0.1:5432:5432" + networks: + - mynet + + redis: + image: redis:8-alpine + container_name: redis + networks: + - mynet + ports: + - "127.0.0.1:6379:6379" + restart: always + volumes: + - ./redis/data:/data + - ./redis/redis.conf:/etc/redis/redis.conf + command: ["redis-server", "/etc/redis/redis.conf"] + + nsfw: + container_name: nsfw + image: helloz/nsfw + networks: + - mynet + ports: + - "6086:6086" + # 环境变量 + environment: + - TOKEN=${NSFW_TOKEN} + restart: always + + imgproxy: + image: ghcr.io/imgproxy/imgproxy + container_name: imgproxy + networks: + - mynet + ports: + - "8088:8080" + environment: + - IMGPROXY_KEY=${IMGPROXY_KEY} + - IMGPROXY_SALT=${IMGPROXY_SALT} + #- IMGPROXY_ALLOWED_SOURCES=https://your-bucket.s3.amazonaws.com,https://cdn.yoursite.com + - IMGPROXY_QUALITY=80 + - IMGPROXY_AUTO_ROTATE=true + - IMGPROXY_AUTO_WEBP=true + - IMGPROXY_MAX_SRC_FILE_SIZE=10485760 + restart: unless-stopped + +networks: + mynet: + driver: bridge \ No newline at end of file