-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
74 lines (70 loc) · 1.92 KB
/
docker-compose.yml
File metadata and controls
74 lines (70 loc) · 1.92 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
version: '3.8'
services:
neuronip-init:
image: postgres:16-alpine
container_name: neuronip-init
depends_on:
- neurondb
environment:
PGHOST: neurondb
PGPORT: 5432
PGUSER: ${POSTGRES_USER:-neurondb}
PGPASSWORD: ${POSTGRES_PASSWORD:-neurondb}
PGDATABASE: postgres
command: >
sh -c "
until pg_isready -h neurondb -p 5432 -U $${PGUSER}; do
sleep 1
done
psql -h neurondb -U $${PGUSER} -d postgres -tc \"SELECT 1 FROM pg_database WHERE datname = 'neuronip'\" | grep -q 1 ||
psql -h neurondb -U $${PGUSER} -d postgres -c \"CREATE DATABASE neuronip;\"
psql -h neurondb -U $${PGUSER} -d neuronip -f /schema/neuronip.sql || echo \"Schema may already be applied\"
"
volumes:
- ./neuronip.sql:/schema/neuronip.sql:ro
networks:
- neurondb-network
restart: "no"
neuronip-server:
build:
context: ./api
dockerfile: Dockerfile
image: neuronip-server:local
container_name: neuronip-server
depends_on:
- neuronip-init
- neurondb
environment:
DB_HOST: neurondb
DB_PORT: 5432
DB_USER: ${POSTGRES_USER:-neurondb}
DB_PASSWORD: ${POSTGRES_PASSWORD:-neurondb}
DB_NAME: neuronip
SERVER_PORT: 8082
NEURONDB_HOST: neurondb
NEURONDB_PORT: "5432"
NEURONDB_DATABASE: neuronip
NEURONAGENT_ENDPOINT: ${NEURONAGENT_ENDPOINT:-http://neuronagent:8080}
ports:
- "8082:8082"
networks:
- neurondb-network
restart: unless-stopped
neuronip-ui:
build:
context: ./frontend
dockerfile: Dockerfile
image: neuronip-ui:local
container_name: neuronip-ui
depends_on:
- neuronip-server
environment:
NEXT_PUBLIC_API_URL: http://localhost:8082/api/v1
ports:
- "3001:3000"
networks:
- neurondb-network
restart: unless-stopped
networks:
neurondb-network:
external: true