Skip to content

Commit 3538e1f

Browse files
committed
feat: Docker compose setup
1 parent 096167f commit 3538e1f

5 files changed

Lines changed: 42 additions & 45 deletions

File tree

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.env
22
.DS_Store
3-
3+
tentris.env
44
# Ignore any file anywhere in the repository called env_variables
55
src/airflow/src/env_variables.json
66

README.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,16 @@ docker run -d \
1111
neo4j:latest
1212
```
1313
## How to deploy tentris
14-
1514
```bash
16-
docker run -d \
17-
-p 9080:9080 \
18-
--name hackathon-db \
19-
-v "$(pwd)/tentris-license.toml:/config/tentris-license.toml:ro" \
20-
-v "$(pwd)/tentris-server-config.toml:/config/tentris-server-config.toml:ro" \
21-
-v "$(pwd)/data:/data" \
22-
-v "$(pwd)/instance_data.ttl:/app/instance_data.ttl:ro" \
23-
-e "TENTRIS_RDF_FILE=/app/instance_data.ttl" \
24-
ghcr.io/tentris/tentris:latest
25-
```
15+
docker compose up -d
16+
```
17+
18+
then, on the user side to run queries:
19+
20+
```sh
21+
curl -c "/tmp/my-tentris-cookie" --data "username=test&password=test" http://localhost:9080/login
22+
```
23+
24+
```sh
25+
curl -b "/tmp/my-tentris-cookie" -H "Content-Type: application/sparql-update" --data "INSERT DATA { <s> <p> <o> }" http://localhost:9080/update
26+
```

docker-compose.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
services:
3+
tentris-db:
4+
image: ghcr.io/tentris/tentris:latest
5+
container_name: hackathon-db
6+
restart: unless-stopped
7+
8+
env_file:
9+
- ./src/tentris-server/tentris.env
10+
11+
environment:
12+
- TENTRIS_RDF_FILE=/app/instance_data.ttl
13+
14+
ports:
15+
- "9080:9080"
16+
17+
volumes:
18+
- ./src/tentris-server/tentris-license.toml:/config/tentris-license.toml:ro
19+
- ./src/tentris-server/tentris-server-config.toml:/config/tentris-server-config.toml:ro
20+
- ./src/tentris-server/instance_data.ttl:/app/instance_data.ttl:ro
21+
22+
- tentris_data:/data
23+
24+
volumes:
25+
tentris_data:
Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,11 @@
11
# Hackathon Server Configuration
2-
# This file goes inside 'tentris-server/'
32

43
[serve]
5-
# This is the most important setting for the hackathon
6-
read-only = true
7-
8-
# The container's internal port
4+
read-only = false
95
bind-address = "[::]:9080"
10-
11-
# Allow plenty of concurrent requests
126
limit-concurrent-requests = 64
13-
14-
# Give participants a 3-minute limit per query
157
limit-query-duration-secs = 180
16-
17-
# Set a 1GB response size limit as a safety net
188
limit-sparql-response-body-size = 1073741824
9+
10+
[serve.auth]
11+
allow-guests = true

tools/images/Dockerfile-tentris-server

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)