-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker-compose.example.yml
More file actions
112 lines (99 loc) · 2.92 KB
/
docker-compose.example.yml
File metadata and controls
112 lines (99 loc) · 2.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# ============================================
# ImageMagick WebGUI - Production Ready
# ============================================
#
# QUICK START:
# 1. Save this file as: docker-compose.yml
# 2. Run: docker compose up -d
# 3. Open: http://localhost:3000
#
#
# For more options see: docs/INSTALLATION.md
# ============================================
services:
app:
image: ghcr.io/przemekskw/imagemagick-webui:latest
ports:
- "3000:3000" # Frontend - change to "3012:3000" for custom port
- "8000:8000" # Backend - change to "8012:8000" for custom port
environment:
- NODE_ENV=production
# Auto-detected! Only change if using reverse proxy with custom routing
- NEXT_PUBLIC_API_PORT=8000 # ← CHANGE HERE to match backend HOST_PORT above
- ALLOWED_ORIGINS=*
# Database (internal - don't change)
- DATABASE_URL=postgresql+asyncpg://imagemagick:imagemagick@postgres:5432/imagemagick
- REDIS_URL=redis://redis:6379/0
# Security (CHANGE IN PRODUCTION!)
- SECRET_KEY=CHANGE_THIS_supersecretkey_production_abc123
- JWT_SECRET=CHANGE_THIS_jwt_secret_production_xyz789
# Authentication
- REQUIRE_LOGIN=false # Set to true to require login
- ALLOW_REGISTRATION=true # Set to false to disable new signups
# Image Processing
- DEFAULT_OUTPUT_FORMAT=webp
- DEFAULT_QUALITY=85
- MAX_UPLOAD_SIZE_MB=100
- IMAGEMAGICK_TIMEOUT=300
- IMAGEMAGICK_MEMORY_LIMIT=2GB
# History
- HISTORY_RETENTION_HOURS=24
# Timezone
- TZ=UTC
# Google OAuth (optional)
- GOOGLE_CLIENT_ID=
- GOOGLE_CLIENT_SECRET=
volumes:
- uploads:/app/uploads
- processed:/app/processed
- temp:/tmp/imagemagick
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/api/health"]
interval: 30s
timeout: 10s
retries: 3
restart: unless-stopped
deploy:
resources:
limits:
memory: 4G
cpus: '2'
postgres:
image: postgres:16-alpine
environment:
- POSTGRES_USER=imagemagick
- POSTGRES_PASSWORD=imagemagick
- POSTGRES_DB=imagemagick
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U imagemagick"]
interval: 5s
timeout: 5s
retries: 5
restart: unless-stopped
redis:
image: redis:7-alpine
command: redis-server --appendonly yes --maxmemory 256mb --maxmemory-policy allkeys-lru
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 5
restart: unless-stopped
volumes:
postgres_data:
redis_data:
uploads:
processed:
temp:
networks:
default:
driver: bridge