-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
161 lines (151 loc) · 4.19 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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
version: "3.8"
services:
frontend:
image: yeagerai/simulator-frontend:${LOCALNETVERSION:-latest}
ports:
- "${FRONTEND_PORT:-8080}:8080"
environment:
- VITE_*
env_file:
- ./.env
depends_on:
jsonrpc:
condition: service_healthy
expose:
- "${FRONTEND_PORT:-8080}"
restart: always
security_opt:
- "no-new-privileges=true"
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
jsonrpc:
image: yeagerai/simulator-jsonrpc:${LOCALNETVERSION:-latest}
environment:
- FLASK_SERVER_PORT=${RPCPORT:-5000}
- PYTHONUNBUFFERED=1
- RPCDEBUGPORT=${RPCDEBUGPORT:-5001}
- WEBREQUESTPORT=${WEBREQUESTPORT:-5002}
- WEBREQUESTHOST=${WEBREQUESTHOST:-localhost}
- WEBREQUESTPROTOCOL=${WEBREQUESTPROTOCOL:-http}
ports:
- "${RPCPORT:-5000}:${RPCPORT:-5000}"
- "${RPCDEBUGPORT:-5001}:${RPCDEBUGPORT:-5001}"
env_file:
- ./.env
healthcheck:
test: [ "CMD", "python3", "backend/healthcheck.py", "--port", "${RPCPORT}" ]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
depends_on:
database-migration:
condition: service_completed_successfully
webrequest:
condition: service_healthy
expose:
- "${RPCPORT:-5000}"
restart: always
security_opt:
- "no-new-privileges=true"
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
deploy:
replicas: ${JSONRPC_REPLICAS:-1}
volumes:
- hardhat_artifacts:/app/hardhat/artifacts
- hardhat_deployments:/app/hardhat/deployments
webrequest:
image: yeagerai/simulator-webrequest:${LOCALNETVERSION:-latest}
shm_size: 2gb
environment:
- FLASK_SERVER_PORT=${WEBREQUESTPORT:-5002}
- WEBREQUESTSELENIUMPORT=${WEBREQUESTSELENIUMPORT:-4444}
- PYTHONUNBUFFERED=1
- WEBREQUESTPORT=${WEBREQUESTPORT}
- WEBREQUESTHOST=${WEBREQUESTHOST}
- WEBREQUESTPROTOCOL=${WEBREQUESTPROTOCOL}
expose:
- "${WEBREQUESTPORT:-5002}:${WEBREQUESTPORT:-5002}"
- "${WEBREQUESTSELENIUMPORT:-4444}:${WEBREQUESTSELENIUMPORT:-4444}"
env_file:
- ./.env
depends_on:
ollama:
condition: service_started
restart: always
security_opt:
- "no-new-privileges=true"
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
ollama:
image: ollama/ollama:0.3.11
ports:
- 11434:11434
container_name: ollama
tty: true
restart: always
security_opt:
- "no-new-privileges=true"
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
postgres:
image: postgres:16-alpine
ports:
- "${DBPORT:-5432}:5432"
environment:
- POSTGRES_USER=${DBUSER:-postgres}
- POSTGRES_PASSWORD=${DBPASSWORD:-postgres}
- POSTGRES_DB=${DBNAME:-simulator_db}
healthcheck:
test: pg_isready -U ${DBUSER:-postgres} -d ${DBNAME:-simulator_db}
interval: 10s
timeout: 3s
retries: 3
restart: always
security_opt:
- "no-new-privileges=true"
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
# Uncomment the following lines if you want your DB to persist
# volumes:
# - "./data/postgres:/var/lib/postgresql/data"
database-migration:
image: yeagerai/simulator-database-migration:${LOCALNETVERSION:-latest}
environment:
- DB_URL=postgresql://${DBUSER:-postgres}:${DBPASSWORD:-postgres}@postgres/${DBNAME:-simulator_db}
- WEBREQUESTPORT=${WEBREQUESTPORT:-5002}
- WEBREQUESTHOST=${WEBREQUESTHOST:-localhost}
- WEBREQUESTPROTOCOL=${WEBREQUESTPROTOCOL:-http}
depends_on:
postgres:
condition: service_healthy
webrequest:
condition: service_healthy
hardhat:
image: yeagerai/simulator-hardhat:${LOCALNETVERSION:-latest}
ports:
- "${HARDHAT_PORT:-8545}:8545"
environment:
- HARDHAT_NETWORK=hardhat
volumes:
- hardhat_artifacts:/app/artifacts
- hardhat_deployments:/app/deployments
volumes:
hardhat_artifacts:
hardhat_deployments: