-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinitialize_compose.yaml
More file actions
95 lines (88 loc) · 2.44 KB
/
initialize_compose.yaml
File metadata and controls
95 lines (88 loc) · 2.44 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
# Define default settings that will be applied to all services
x-service-defaults: &service-defaults
deploy:
restart_policy:
condition: "none"
labels:
- "com.docker.compose.rm=true"
volumes:
ql_dvol:
services:
volume-setup: ## TODO, this is likely not need, change to the "list content" service
<<: *service-defaults
image: alpine:latest
volumes:
- ql_dvol:/data
command: chown -R 1000:1000 /data
user: root
downloader:
<<: *service-defaults
image: alpine/curl
depends_on:
volume-setup:
condition: service_completed_successfully
user: "1000:1000" # Add this line to run as the same user
volumes:
- ql_dvol:/data
- ${PWD}:/tmp/localdata:ro
command: >
sh -c "cp /tmp/localdata/Qleverfile /data &&
cp /tmp/localdata/Qleverfile-ui.yml /data &&
ls -l /data && echo 'Files copied to /data/'"
getsql:
<<: *service-defaults
image: adfreiburg/qlever-ui:latest
depends_on:
downloader:
condition: service_completed_successfully
user: "1000:1000"
volumes:
- ql_dvol:/data
# working_dir: /data
command: >
sh -c "cp /app/db/qleverui.sqlite3 /data/odis-qleverui.sqlite3 &&
chown 1000 /data/odis-qleverui.sqlite3 &&
chmod 666 /data/odis-qleverui.sqlite3 &&
ls -l /data && echo 'Files in /data/'"
stdin_open: true
tty: true
getdata:
<<: *service-defaults
image: adfreiburg/qlever:latest
depends_on:
getsql:
condition: service_completed_successfully
user: "1000:1000"
volumes:
- ql_dvol:/data
working_dir: /data
command: ["qlever -q Qleverfile get-data"]
stdin_open: true
tty: true
indexer:
<<: *service-defaults
image: adfreiburg/qlever:latest
depends_on:
getdata:
condition: service_completed_successfully
user: "1000:1000"
volumes:
- ql_dvol:/data
working_dir: /data
command:
[
"qlever -q Qleverfile index --system native --overwrite-existing --text-index from_text_records_and_literals",
]
stdin_open: true
tty: true
report:
<<: *service-defaults
image: alpine/curl
depends_on:
indexer:
condition: service_completed_successfully
user: "1000:1000" # Add this line to run as the same user
volumes:
- ql_dvol:/data
command: >
sh -c "ls -l /data && cat /data/odis.settings.json && cat /data/Qleverfile"