-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.example.yml
More file actions
117 lines (95 loc) · 3.26 KB
/
Copy pathdocker-compose.example.yml
File metadata and controls
117 lines (95 loc) · 3.26 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
113
114
115
116
117
version: "3.8"
# This is an example override file that shows all available configuration options
# You can either:
# 1. Copy to docker-compose.override.yml and modify as needed for local development
# 2. Use environment variables to configure the main docker-compose.yml file
# 3. Create a .env file with your environment variables
services:
api:
# Container image configuration
image: ghcr.io/L3-N0X/pixeletica-api:latest
# Port configuration
ports:
- "8000:8000" # Change first number to use different host port
environment:
# API configuration
- PIXELETICA_API_HOST=0.0.0.0
- PIXELETICA_API_PORT=8000
- REDIS_URL=redis://redis:6379/0
- WAIT_FOR_REDIS=true
# Log level configuration
- LOG_LEVEL=info # Options: debug, info, warning, error, critical
# Upload limits
- MAX_UPLOAD_SIZE=10485760 # 10MB default
# Security settings
- CORS_ORIGINS=http://localhost:3000,https://example.com
# Development volume mounts (uncomment for local development)
# volumes:
# - ./src:/app/src # Example for code mounting
# - pixeletica_tasks_data:/app/tasks # Mount task data volume
# Resource limits
deploy:
resources:
limits:
cpus: "1"
memory: 1G
reservations:
cpus: "0.25"
memory: 256M
worker:
# Container image configuration
image: ghcr.io/L3-N0X/pixeletica-worker:latest
environment:
# Worker configuration
- REDIS_URL=redis://redis:6379/0
- WAIT_FOR_REDIS=true
- LOG_LEVEL=info # Options: debug, info, warning, error, critical
# Concurrency settings
- CELERY_CONCURRENCY=2 # Number of worker processes
# Task time limits
- CELERY_TASK_TIME_LIMIT=3600 # 1 hour
- CELERY_TASK_SOFT_TIME_LIMIT=3000 # 50 minutes
# Development volume mounts (uncomment for local development)
# volumes:
# - ./src:/app/src # Example for code mounting
# - pixeletica_tasks_data:/app/tasks # Mount task data volume
# Resource limits
deploy:
resources:
limits:
cpus: "2"
memory: 2G
reservations:
cpus: "0.5"
memory: 512M
replicas: 1 # Set to higher number for more parallelism
redis:
# Use Alpine for smaller image or full Redis for more features
image: redis:7-alpine
# Redis server configuration
command: redis-server --appendonly yes --maxmemory 256mb --maxmemory-policy volatile-lru
# Uncomment to expose Redis port (for development only)
# ports:
# - "6379:6379"
# Uncomment for custom Redis configuration and persistence
# volumes:
# - ./config/redis.conf:/usr/local/etc/redis/redis.conf # Custom config
# - redis_data:/data # Persist Redis data
# Resource limits
deploy:
resources:
limits:
cpus: "0.5"
memory: 256M
# Volume configuration
volumes:
pixeletica_tasks_data:
{} # Defines the volume for task data
# Optional: specify a custom name or external volume
# name: custom_pixeletica_data_name
# external: true
redis_data:
{} # Defines the volume for Redis persistence
# Optional: specify a custom name or external volume
# name: custom_redis_data_name
# external: true