-
Notifications
You must be signed in to change notification settings - Fork 59
Expand file tree
/
Copy pathdocker-compose.build.yaml
More file actions
94 lines (88 loc) · 2.49 KB
/
docker-compose.build.yaml
File metadata and controls
94 lines (88 loc) · 2.49 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
version: '3.8'
# Local build version - use this for development and testing
# Usage: docker-compose -f docker-compose.build.yaml up --build -d
services:
backend:
build:
context: .
dockerfile: Dockerfile.backend
container_name: imageflow-backend
ports:
- "8686:8686"
volumes:
- ./static/images:/app/static/images
- ./config:/app/config
- .env:/app/.env
environment:
- API_KEY=${API_KEY:-default_api_key}
- STORAGE_TYPE=${STORAGE_TYPE:-local}
- LOCAL_STORAGE_PATH=/app/static/images
- S3_ENDPOINT=${S3_ENDPOINT:-}
- S3_REGION=${S3_REGION:-}
- S3_ACCESS_KEY=${S3_ACCESS_KEY:-}
- S3_SECRET_KEY=${S3_SECRET_KEY:-}
- S3_BUCKET=${S3_BUCKET:-}
- CUSTOM_DOMAIN=${CUSTOM_DOMAIN:-}
- MAX_UPLOAD_COUNT=${MAX_UPLOAD_COUNT:-20}
- IMAGE_QUALITY=${IMAGE_QUALITY:-80}
- WORKER_THREADS=${WORKER_THREADS:-4}
- SPEED=${SPEED:-5}
- METADATA_STORE_TYPE=${METADATA_STORE_TYPE:-redis}
- REDIS_HOST=${REDIS_HOST:-redis}
- REDIS_PORT=${REDIS_PORT:-6379}
- REDIS_PASSWORD=${REDIS_PASSWORD:-}
- REDIS_DB=${REDIS_DB:-0}
- REDIS_TLS_ENABLED=${REDIS_TLS_ENABLED:-false}
- DEBUG_MODE=${DEBUG_MODE:-false}
restart: unless-stopped
depends_on:
- redis
healthcheck:
test: ["CMD-SHELL", "wget -q --spider http://127.0.0.1:8686/api/random || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
networks:
- imageflow-network
frontend:
build:
context: .
dockerfile: Dockerfile.frontend
container_name: imageflow-frontend
ports:
- "3000:3000"
environment:
- NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL:-http://backend:8686}
- NEXT_PUBLIC_REMOTE_PATTERNS=${NEXT_PUBLIC_REMOTE_PATTERNS:-http://backend:8686}
healthcheck:
test: [ "CMD", "wget", "-q", "--spider", "http://localhost:3000/", "||", "exit", "1" ]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
depends_on:
- backend
restart: unless-stopped
networks:
- imageflow-network
redis:
image: redis:alpine
container_name: imageflow-redis
ports:
- "6379:6379"
volumes:
- redis_data:/data
restart: unless-stopped
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
interval: 30s
timeout: 10s
retries: 3
networks:
- imageflow-network
networks:
imageflow-network:
driver: bridge
volumes:
redis_data: