Skip to content

Option 1: Deploying Allegrograph on the same link as your FDP

1. Start by updating your docker-compose.yml with the Allegrograph configuration
services:
proxy:
container_name: fdp-proxy
image: nginx:latest
ports:
- 80:80
- 443:443
volumes:
# Mount the nginx folder with the configuration
- ./nginx:/etc/nginx:ro
# Mount the letsencrypt certificates
- /etc/letsencrypt:/etc/letsencrypt:ro
restart: always

fdp:
container_name: fdp
image: fairdata/fairdatapoint:1.15.0
volumes:
- ./application.yml:/fdp/application.yml:ro
depends_on:
- blazegraph
- mongo
restart: unless-stopped

fdp-client:
container_name: fdp-client
image: fairdata/fairdatapoint-client:1.15.0
environment:
- FDP_HOST=fdp
depends_on:
- fdp
restart: unless-stopped

mongo:
container_name: mongo
image: mongo:4.0.12
ports:
- 127.0.0.1:27017:27017
volumes:
- ./mongo/data:/data/db
restart: unless-stopped

blazegraph:
container_name: blazegraph
image: metaphacts/blazegraph-basic:latest
ports:
- 8081:8080
volumes:
- ./blazegraph:/blazegraph-data
environment:
- JAVA_OPTS=-Xmx2g -Xms1g
restart: unless-stopped

allegrograph:
container_name: allegrograph
image: franzinc/agraph:latest
environment:
# Please change these default credentials for security purposes
- AGRAPH_SUPER_USER=admin
- AGRAPH_SUPER_PASSWORD=adminpassword
shm_size: 1g
volumes:
- ./agraph_data:/agraph/data
- ./agraph_etc:/agraph/etc
restart: unless-stopped


2. Update your NGINX configuration nginx/sites-avaialble/fdp.conf
server {
listen 443 ssl;

# Generated certificates using certbot, mounting these in docker-compose.yml
ssl_certificate /etc/letsencrypt/live/<your-domain.com>/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/<your-domain.com>/privkey.pem;

server_name fdp.tangaza.ac.ke;

# AllegroGraph Webview Route
location = /agraph {
return 301 /agraph/;
}

location /agraph/ {
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass_request_headers on;
proxy_pass http://allegrograph:10035/;
}

location / {
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass_request_headers on;
proxy_pass http://fdp-client;
}
}

# Redirect all request from HTTP to HTTPS
server {
listen 80;
server_name fdp.tangaza.ac.ke;
return 301 https://$host$request_uri;
}

3. Save the updated docker-compose.yml and nginx/sites-avaialble/fdp.conf
4. Restart your Docker containers to apply the new Nginx configuration and spin up AllegroGraph
docker compose down
docker compose up -d

5. Visit https://<your-domain>/agraph/ and log in using your admin and adminpassword credentials set in docker-compose.yml
Want to print your doc?
This is not the way.
Try clicking the ··· in the right corner or using a keyboard shortcut (
CtrlP
) instead.