-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
103 lines (98 loc) · 2.74 KB
/
docker-compose.yml
File metadata and controls
103 lines (98 loc) · 2.74 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
95
96
97
98
99
100
101
102
103
services:
# 1. Neurai Node
node:
build:
context: ./node
dockerfile: Dockerfile
pull_policy: never
image: neurai-explorer-node:latest
container_name: neurai-explorer-node
restart: unless-stopped
environment:
NEURAI_RPC_USER: ${RPC_USER:-neuraiuser}
NEURAI_RPC_PASS: ${RPC_PASS:-neuraipassword}
NEURAI_RPC_WORKQUEUE: ${RPC_WORKQUEUE:-1024}
NEURAI_RPC_THREADS: ${RPC_THREADS:-256}
volumes:
- node-data:/data/node
networks:
- neurai-explorer-net
# 2. PostgreSQL Database
postgres:
image: postgres:18.1-alpine
container_name: neurai-explorer-postgres
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER:-neurai}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-neurai123}
POSTGRES_DB: ${POSTGRES_DB:-neuraidb}
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U neurai -d neuraidb" ]
interval: 5s
timeout: 5s
retries: 5
volumes:
- pg-data:/var/lib/postgresql/data
networks:
- neurai-explorer-net
# 3. Syncer Service (Rust)
syncer:
image: neurai-explorer-syncer:latest
build:
context: ./syncer
dockerfile: Dockerfile
container_name: neurai-explorer-syncer
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
node:
condition: service_started
environment:
RPC_HOST: node
RPC_PORT: 19001
RPC_USER: ${RPC_USER:-neuraiuser}
RPC_PASS: ${RPC_PASS:-neuraipassword}
DATABASE_URL: postgresql://${POSTGRES_USER:-neurai}:${POSTGRES_PASSWORD:-neurai123}@postgres:5432/${POSTGRES_DB:-neuraidb}
RUST_LOG: info,sqlx=warn,reqwest=warn
extra_hosts:
- "host.docker.internal:host-gateway"
networks:
- neurai-explorer-net
# Resource limits
deploy:
resources:
limits:
memory: 12G
reservations:
memory: 2G
# 4. Frontend (Next.js) + Tailwind CSS
frontend:
image: neurai-explorer-frontend:latest
build:
context: ./frontend
dockerfile: Dockerfile
container_name: neurai-explorer-frontend
restart: unless-stopped
ports:
- "3333:3000"
environment:
DATABASE_URL: postgresql://${POSTGRES_USER:-neurai}:${POSTGRES_PASSWORD:-neurai123}@postgres:5432/${POSTGRES_DB:-neuraidb}
NEURAI_RPC_URL: http://node:19001
NEURAI_RPC_USER: ${RPC_USER:-neuraiuser}
NEURAI_RPC_PASSWORD: ${RPC_PASS:-neuraipassword}
depends_on:
postgres:
condition: service_healthy
node:
condition: service_started
extra_hosts:
- "host.docker.internal:host-gateway"
networks:
- neurai-explorer-net
networks:
neurai-explorer-net:
driver: bridge
volumes:
node-data:
pg-data: