-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
75 lines (74 loc) · 1.8 KB
/
docker-compose.yaml
File metadata and controls
75 lines (74 loc) · 1.8 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
version: '3.8'
services:
redis:
image: redis:6.2-alpine
restart: always
# expose:
# - 6379
ports:
- "6379:6379"
command: redis-server /app/deployment/redis.conf --stop-writes-on-bgsave-error no --loglevel debug --requirepass $REDIS_PASSWORD
volumes:
# - redis:/data
- ./:/app
api:
build: .
image: irgolic/stable-diffusion-api:latest
depends_on:
- redis
# expose:
# - 8000
ports:
- "8000:8000"
environment:
SECRET_KEY: $SECRET_KEY
REDIS_HOST: redis
REDIS_PASSWORD: $REDIS_PASSWORD
REDIS_PORT: $REDIS_PORT
PRINT_LINK_WITH_TOKEN: $PRINT_LINK_WITH_TOKEN
ENABLE_PUBLIC_ACCESS: $ENABLE_PUBLIC_ACCESS
ENABLE_SIGNUP: $ENABLE_SIGNUP
links:
- redis
volumes:
- ./:/app
command: deployment/run_redis_app.sh
redis_worker:
image: irgolic/stable-diffusion-api:latest
deploy:
replicas: 5
depends_on:
- redis
environment:
REDIS_HOST: redis
SECRET_KEY: $SECRET_KEY
HUGGINGFACE_TOKEN: $HUGGINGFACE_TOKEN
REDIS_PASSWORD: $REDIS_PASSWORD
REDIS_PORT: $REDIS_PORT
links:
- redis
volumes:
- ./:/app
- ~/.cache/huggingface:/root/.cache/huggingface
entrypoint: deployment/run_redis_worker.sh
e2e_tests:
image: irgolic/stable-diffusion-api:latest
depends_on:
- redis
- api
- redis_worker
environment:
API_URL: http://api:8000
SECRET_KEY: $SECRET_KEY
REDIS_HOST: redis
REDIS_PASSWORD: $REDIS_PASSWORD
REDIS_PORT: $REDIS_PORT
PRINT_LINK_WITH_TOKEN: $PRINT_LINK_WITH_TOKEN
ENABLE_PUBLIC_ACCESS: $ENABLE_PUBLIC_ACCESS
ENABLE_SIGNUP: $ENABLE_SIGNUP
links:
- redis
- api
volumes:
- ./:/app
command: deployment/run_tests.sh