forked from irgolic/stable-diffusion-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
70 lines (69 loc) · 1.59 KB
/
docker-compose.yaml
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
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-server
depends_on:
- redis
# expose:
# - 8000
ports:
- "8000:8000"
environment:
SECRET_KEY: $SECRET_KEY
REDIS_HOST: redis
REDIS_PASSWORD: $REDIS_PASSWORD
REDIS_PORT: $REDIS_PORT
ENABLE_PUBLIC_TOKEN: $ENABLE_PUBLIC_TOKEN
ENABLE_SIGNUP: $ENABLE_SIGNUP
links:
- redis
volumes:
- ./:/app
command: deployment/run_redis_app.sh
redis_worker:
image: irgolic/stable-diffusion-server:latest
deploy:
replicas: 5
depends_on:
- redis
environment:
REDIS_HOST: redis
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-server: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
links:
- redis
- api
volumes:
- ./:/app
command: deployment/run_tests.sh