You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

82 lines
1.8 KiB

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:
- "8080: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