-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
138 lines (137 loc) · 3.31 KB
/
docker-compose.yml
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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
version: '3.9'
services:
bot:
build: ./discord-client/
restart: always
volumes:
- ./discord-client/config.py:/bot/config.py
depends_on:
- api
- info-streaming
environment:
ADMINISTRATORS: 401555829620211723, 608314233079201834
PYTHONUNBUFFERED: 1
PYTHONDONTWRITEBYTECODE: 1
TOKEN: /run/secrets/discord_token
PROXY: /run/secrets/proxy
DISABLE_PROXY: ${DISABLE_PROXY}
PREFIX: ${PREFIX}
secrets:
- discord_token
- proxy
api:
build:
context: ./api/
restart: always
environment:
PYTHONDONTWRITEBYTECODE: 1
PYTHONUNBUFFERED: 1
FLASK_RUN_PORT: 9462
FLASK_RUN_HOST: 0.0.0.0
FLASK_APP: api.py
depends_on:
- generator
volumes:
- ./api/.database:/api/.database/
main-generator:
build:
context: ./generator/
restart: always
environment:
PYTHONDONTWRITEBYTECODE: 1
PYTHONUNBUFFERED: 1
FLASK_RUN_PORT: 4321
FLASK_RUN_HOST: 0.0.0.0
FLASK_APP: api.py
TOKEN: /run/secrets/main_gpt_token
MODEL_URI: /run/secrets/main_gpt_uri
API_KEY: /run/secrets/main_gpt_api_key
AUTH_TYPE: ${AUTH_TYPE}
secrets:
- main_gpt_token
- main_gpt_uri
- main_gpt_api_key
reserve-generator:
build:
context: ./generator/
restart: always
environment:
PYTHONDONTWRITEBYTECODE: 1
PYTHONUNBUFFERED: 1
FLASK_RUN_PORT: 4321
FLASK_RUN_HOST: 0.0.0.0
FLASK_APP: api.py
TOKEN: /run/secrets/reserve_gpt_token
MODEL_URI: /run/secrets/reserve_gpt_uri
API_KEY: /run/secrets/reserve_gpt_api_key
AUTH_TYPE: ${AUTH_TYPE}
secrets:
- reserve_gpt_token
- reserve_gpt_uri
- reserve_gpt_api_key
generator:
build:
context: .
dockerfile: ./nginx/Dockerfile
depends_on:
- main-generator
- reserve-generator
restart: always
info-streaming:
build: info-streaming/
restart: always
environment:
PYTHONDONTWRITEBYTECODE: 1
PYTHONUNBUFFERED: 1
FLASK_RUN_PORT: 80
FLASK_RUN_HOST: 0.0.0.0
FLASK_APP: app.py
ports:
- "${INFO_STREAMING_PORT}:80"
depends_on:
- api
- frame-generator
- redis
frame-generator:
build: ./frame-generator/
restart: always
environment:
PYTHONDONTWRITEBYTECODE: 1
PYTHONUNBUFFERED: 1
FLASK_RUN_PORT: 1334
FLASK_RUN_HOST: 0.0.0.0
FLASK_APP: app.py
depends_on:
- api
redis:
image: redis:latest
restart: always
environment:
- REDIS_PORT=1239
- REDIS_DATABASES=16
- ALLOW_EMPTY_PASSWORD=yes
- REDIS_DISABLE_COMMANDS=FLUSHDB,FLUSHALL,CONFIG
command: [
"redis-server",
"--appendonly", "no",
"--maxmemory", "500mb",
"--maxmemory-policy", "allkeys-lru",
"--port", "1239"
]
secrets:
main_gpt_token:
file: ./secrets/gpt-main/token.txt
main_gpt_uri:
file: ./secrets/gpt-main/model_uri.txt
main_gpt_api_key:
file: ./secrets/gpt-main/api_key.txt
reserve_gpt_token:
file: ./secrets/gpt-reserve/token.txt
reserve_gpt_uri:
file: ./secrets/gpt-reserve/model_uri.txt
reserve_gpt_api_key:
file: ./secrets/gpt-reserve/api_key.txt
discord_token:
file: ./secrets/discord_token.txt
proxy:
file: ./secrets/proxy.txt