Docker - aantakli/AJAN-service GitHub Wiki
Contents
Basic Usage
Running with docker run
AJAN Service
Quick startup:
docker run -d --name ajan-service -p 8080:8080 -p 8090:8090 aantakli/ajan-service:latest
This will start the container for the AJAN-service on ports 8080 and 8090
AJAN Editor
Quick startup:
docker run -d --name ajan-editor -p 4200:4200 -p 4201:4201 -p 4202:4202 aantakli/ajan-editor:latest
This will start the container for the AJAN-editor on port 4200
Running with docker-compose
Quick startup:
version: "2"
services:
ajan_service:
image: aantakli/ajan-service:latest
ports:
- 8080:8080
- 8090:8090
container_name: ajan-service
volumes:
- ./ajan-service/data:/ajan
ajan_editor:
image: aantakli/ajan-editor:latest
ports:
- 4200:4200
container_name: ajan-editor
depends_on:
- "ajan_service"
This will start both the AJAN-editor as well as the AJAN-service on their respective ports 4200 and 8080 and 8090
Advanced Usage
If you are unfamiliar with docker or docker-compose or need a refresher on syntax, please refere to the official documentation for docker run and docker-compose
Configuration AJAN-service
Ports:
8080
8090
Available environment variables:
Variable | Description |
---|---|
url | HTTP Endpoint of the rdf repository |
DloadTTLFiles | Loading of predefined models with start of AJAN service, this overwrites the existing models in the Triplestore |
DpublicHostName | Setting base URL for agents |
Available volumes:
Volume | Description |
---|---|
/logs | Runtime logs for AJAN-service will be placed here* |
*There will also be a file called CONTAINER_ALREADY_STARTED_PLACEHOLDER
this file is used to determine wether the container had already started before. This is because on first startup the container will initialize the rdf-storage with some data
Configuration AJAN-editor
Currently the only configuration you can make for AJAN-editor is its port 4200
Fully configured docker run command with default values as a startingpoint
AJAN-editor: docker run -d --name ajan-editor -p 4200:4200 aantakli/ajan-editor:latest
AJAN-service:
docker run -d --name ajan-service -p 8080:8080 -p 8090:8090 -v /path/to/loglocation:/logs -e "url=http://localhost:8090/rdf4j" -e "repoURL=http://localhost:8090/rdf4j/repositories/" -e "Dpf4j_mode=development" -e "DloadTTLFiles=true" aantakli/ajan-service:latest
Fully configured docker-compose file with default values as a startingpoint
version: "2"
services:
ajan_service:
image: aantakli/ajan-service:latest
ports:
- 8080:8080
- 8090:8090
container_name: ajan-service
volumes:
- ./ajan-service/logs:/logs
environment:
- url=http://localhost:8090/rdf4j
- repoURL=http://localhost:8090/rdf4j/repositories/
- Dpf4j_mode=development
- DloadTTLFiles=true
- DpublicHostName=localhost
ajan_editor:
image: aantakli/ajan-editor:latest
ports:
- 4200:4200
container_name: ajan-editor
depends_on:
- "ajan_service"