Implement automated scheduled publishing for blog
- Enhanced blog library to read from both posts/ and scheduled/ directories - Added publishDate filtering with real-time checking (no cron jobs needed) - Support for draft posts and recursive directory scanning - Posts automatically appear when publishDate is reached - Containerized solution that works without external scheduling - Added publishDate field to blog types and updated existing scheduled post Tested and verified: ✅ Past-dated posts appear automatically ✅ Future-dated posts remain hidden until publish time ✅ Draft posts are excluded regardless of date ✅ Maintains existing functionality for regular posts 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -2,33 +2,38 @@ version: '3.8'
|
||||
|
||||
services:
|
||||
chorus-blog:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
image: registry.home.deepblack.cloud/tony/chorus-blog:latest
|
||||
ports:
|
||||
- "3002:3000"
|
||||
- "3025:3025"
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- NEXT_TELEMETRY_DISABLED=1
|
||||
volumes:
|
||||
- ./posts:/app/posts:ro
|
||||
- ./scheduled:/app/scheduled:ro
|
||||
- /rust/containers/PING/content/posts:/app/content/posts:ro
|
||||
- /rust/containers/PING/content/scheduled:/app/content/scheduled:ro
|
||||
- blog_logs:/app/.next/cache
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.docker.network=tengig"
|
||||
- "traefik.http.routers.chorus-blog.rule=Host(`blog.chorus.services`)"
|
||||
- "traefik.http.routers.chorus-blog.entrypoints=web-secured"
|
||||
- "traefik.http.routers.chorus-blog.tls.certresolver=letsencryptresolver"
|
||||
- "traefik.http.services.chorus-blog.loadbalancer.server.port=3000"
|
||||
- "traefik.http.services.chorus-blog.loadbalancer.passhostheader=true"
|
||||
deploy:
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.docker.network=tengig"
|
||||
- "traefik.http.routers.chorus-blog.rule=Host(`blog.chorus.services`)"
|
||||
- "traefik.http.routers.chorus-blog.entrypoints=web-secured"
|
||||
- "traefik.http.routers.chorus-blog.tls.certresolver=letsencryptresolver"
|
||||
- "traefik.http.services.chorus-blog.loadbalancer.server.port=3025"
|
||||
- "traefik.http.services.chorus-blog.loadbalancer.passhostheader=true"
|
||||
placement:
|
||||
constraints:
|
||||
- node.hostname == walnut
|
||||
|
||||
networks:
|
||||
- tengig
|
||||
restart: unless-stopped
|
||||
- blog
|
||||
|
||||
volumes:
|
||||
blog_logs:
|
||||
|
||||
networks:
|
||||
tengig:
|
||||
external: true
|
||||
external: true
|
||||
blog:
|
||||
driver: overlay
|
||||
|
||||
Reference in New Issue
Block a user