🐳 docker

This commit is contained in:
mi
2025-11-06 22:30:56 +10:00
parent 08bc888df0
commit a3f0132c7e
4 changed files with 162 additions and 8 deletions

23
docker-compose.yml Normal file
View File

@@ -0,0 +1,23 @@
version: '3.8'
services:
web:
build: .
ports:
- "3000:3000"
environment:
- SECRET_KEY=${SECRET_KEY:-please-change-this-secret-key}
- PORT=3000
- DEBUG=False
volumes:
# Mount comics data for easy updates without rebuilding
- ./comics_data.py:/app/comics_data.py:ro
- ./static/images:/app/static/images:ro
- ./static/feed.rss:/app/static/feed.rss:ro
restart: unless-stopped
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:3000').read()"]
interval: 30s
timeout: 3s
retries: 3
start_period: 5s