forked from lo-dn/singularis
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
134 lines (126 loc) · 3.46 KB
/
Copy pathdocker-compose.yml
File metadata and controls
134 lines (126 loc) · 3.46 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
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
name: singularis
services:
grobid:
image: lfoppiano/grobid:latest-crf
container_name: grobid
environment:
GROBID__NB_THREADS: "2"
GROBID__MAX_CONNECTIONS: "8"
ports:
- "8070:8070" # REST API
- "8071:8071" # Admin
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:8070/api/isalive"]
interval: 15s
timeout: 5s
retries: 20
networks: [singularis-net]
# neo4j:
# image: neo4j:5
# container_name: neo4j
# environment:
# NEO4J_AUTH: ${NEO4J_AUTH:-neo4j/testtest}
# NEO4J_apoc_export_file_enabled: "true"
# NEO4J_apoc_import_file_enabled: "true"
# NEO4J_apoc_import_file_use__neo4j__config: "true"
# NEO4J_dbms_security_procedures_unrestricted: "apoc.*"
# ports:
# - "7474:7474" # HTTP UI
# - "7687:7687" # Bolt
# volumes:
# - neo4j-data:/data
# - neo4j-logs:/logs
# - ./export:/import
# healthcheck:
# test: ["CMD", "wget", "-qO-", "http://localhost:7474"]
# interval: 15s
# timeout: 5s
# retries: 20
# networks: [singularis-net]
redis:
image: redis:7
container_name: redis
ports: ["6379:6379"]
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 30
networks: [singularis-net]
api:
build:
context: ./ui/server # FastAPI сервер
dockerfile: Dockerfile
container_name: singularis-api
env_file: .env
environment:
GROBID_URL: http://grobid:8070
REDIS_URL: redis://redis:6379/0
# NEO4J_URI: bolt://neo4j:7687
# NEO4J_USER: ${NEO4J_USER:-neo4j}
NEO4J_PASSWORD: ${NEO4J_PASSWORD:-testtest}
volumes:
- ./pipeline:/app/pipeline:ro
- ./rules:/app/rules:ro
- ./export:/app/export
- ./data:/app/data
- ./dataset:/app/dataset:ro
- ./tools:/app/tools:ro
- ./ui:/app/ui:ro
- ./workdir:/app/workdir
ports:
- "8000:8000" # FastAPI
depends_on:
grobid:
condition: service_healthy
# neo4j:
# condition: service_healthy
redis:
condition: service_healthy
command: uvicorn app.main:app --host 0.0.0.0 --port 8000
networks: [singularis-net]
worker:
build:
context: ./pipeline # S1/S2 пайплайн
dockerfile: Dockerfile
container_name: singularis-worker
env_file: .env
environment:
REDIS_URL: redis://redis:6379/0
GROBID_URL: http://grobid:8070
# NEO4J_URI: bolt://neo4j:7687
# NEO4J_USER: ${NEO4J_USER:-neo4j}
# NEO4J_PASSWORD: ${NEO4J_PASSWORD:-testtest}
OPENAI_API_KEY: ${OPENAI_API_KEY}
volumes:
- ./pipeline:/app:rw
- ./rules:/app/rules:ro
- ./data:/app/data
- ./export:/app/export
- ./dataset:/app/dataset:ro
- ./tools:/app/tools:ro
- ./workdir:/app/workdir
depends_on:
redis:
condition: service_healthy
# пример: rq worker или celery - адаптируй под свой раннер
command: python -m pipeline.worker
networks: [singularis-net]
web:
build:
context: ./ui/web # React + Cytoscape
dockerfile: Dockerfile
container_name: singularis-web
environment:
VITE_API_URL: http://localhost:8000
ports:
- "3000:3000" # React dev / Vite
depends_on:
- api
networks: [singularis-net]
networks:
singularis-net:
driver: bridge
#volumes:
# neo4j-data:
# neo4j-logs: