-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
118 lines (112 loc) · 3.34 KB
/
docker-compose.yml
File metadata and controls
118 lines (112 loc) · 3.34 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
services:
# Permission fixer for Semem data and log directories
semem-init:
image: node:22-slim
command: >
bash -c "
mkdir -p /app-data/data /app-data/logs &&
chown -R node:node /app-data &&
chmod -R 755 /app-data &&
echo 'Permissions fixed for Semem directories'
"
volumes:
- ./docker-data/semem/data:/app-data/data
- ./docker-data/semem/logs:/app-data/logs
networks:
- semem-network
# Permission fixer for Fuseki data directories
fuseki-init:
image: node:22-slim
command: >
bash -c "
mkdir -p /fuseki-base/templates /fuseki-base/logs /fuseki-base/backups /fuseki-base/system_files /fuseki-base/databases /fuseki-base/configuration &&
cp /config/assembler.ttl /fuseki-base/configuration/assembler.ttl &&
cp /config/shiro.ini /fuseki-base/shiro.ini &&
chown -R 9008:9008 /fuseki-base /fuseki &&
chmod -R 755 /fuseki-base /fuseki &&
chmod 664 /fuseki-base/shiro.ini /fuseki-base/configuration/assembler.ttl &&
echo 'Permissions fixed for Fuseki directories'
"
volumes:
- ./docker-data/fuseki:/fuseki
- ./docker-data/fuseki-base:/fuseki-base
- ./config/fuseki/assembler-tdb2.ttl:/config/assembler.ttl:ro
- ./config/fuseki/shiro.ini:/config/shiro.ini:ro
networks:
- semem-network
# Apache Jena Fuseki - SPARQL Database
fuseki:
image: secoresearch/fuseki:latest
container_name: semem-fuseki
ports:
- "4050:3030"
volumes:
- ./docker-data/fuseki:/fuseki
- ./docker-data/fuseki-base:/fuseki-base
environment:
# ADMIN_PASSWORD removed - already configured in shiro.ini to avoid sed write errors
# - ADMIN_PASSWORD=admin123
- JVM_ARGS=-Xmx2g
depends_on:
fuseki-init:
condition: service_completed_successfully
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:3030/$$/ping || exit 1"]
interval: 15s
timeout: 5s
retries: 3
start_period: 30s
networks:
- semem-network
# Semem Application
semem:
build:
context: .
dockerfile: Dockerfile
target: runtime
container_name: semem-app
ports:
- "4100:4100" # API Server
- "4101:4101" # MCP Server
- "4102:4102" # Workbench UI
volumes:
- ./docker-data/semem/data:/app/data
- ./docker-data/semem/logs:/app/logs
- ./config/config.json:/app/config/config.json:ro
- ./sparql:/app/sparql:ro
env_file:
- .env
environment:
- NODE_ENV=production
- SPARQL_HOST=fuseki
- SPARQL_PORT=3030
depends_on:
semem-init:
condition: service_completed_successfully
fuseki:
condition: service_healthy
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:4100/api/health"]
interval: 30s
timeout: 10s
retries: 5
start_period: 60s
networks:
- semem-network
deploy:
resources:
limits:
memory: 4G
cpus: '2.0'
reservations:
memory: 2G
cpus: '1.0'
# Volumes section removed - using bind mounts to docker-data/ directory instead
networks:
semem-network:
driver: bridge
ipam:
config:
- subnet: 172.22.0.0/16