Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Top-level docker-compose.yml #1512

Merged
merged 2 commits into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 10 additions & 13 deletions dockerfiles/docker-compose.yml → docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,49 +2,46 @@ version: '3.7'

services:
fuseki:
container_name: skosmos-fuseki
hostname: fuseki
build:
context: ../dockerfiles/jena-fuseki2-docker
context: ./dockerfiles/jena-fuseki2-docker
dockerfile: Dockerfile
args:
JENA_VERSION: 4.8.0
command: --config=/fuseki/skosmos.ttl
environment:
- JAVA_OPTIONS=-Xmx2g -Xms1g
ports:
- '9030:3030'
- ${FUSEKI_PORT:-9030}:3030
volumes:
# You can uncomment the lines below to persist data used in the
# container. For more complete documentation about it, please
# consult the official Apache Jena docs at
# https://github.com/apache/jena/tree/main/jena-fuseki2/jena-fuseki-docker
# - ./databases:/fuseki/databases
# - ./logs:/fuseki/logs
- ./config/skosmos.ttl:/fuseki/skosmos.ttl
# - ./dockerfiles/databases:/fuseki/databases
# - ./dockerfiles/logs:/fuseki/logs
- ./dockerfiles/config/skosmos.ttl:/fuseki/skosmos.ttl
user: 'fuseki:fuseki'
fuseki-cache:
container_name: skosmos-fuseki-cache
hostname: fuseki-cache
image: varnish
ports:
- '9031:80'
- ${CACHE_PORT:-9031}:80
volumes:
- type: bind
source: ./config/varnish-default.vcl
source: ./dockerfiles/config/varnish-default.vcl
target: /etc/varnish/default.vcl
skosmos:
container_name: skosmos-web
hostname: skosmos
build:
context: ..
context: .
dockerfile: dockerfiles/Dockerfile.ubuntu
ports:
- '9090:80'
- ${SKOSMOS_PORT:-9090}:80
depends_on:
- fuseki
- fuseki-cache
volumes:
- type: bind
source: ./config/config-docker-compose.ttl
source: ./dockerfiles/config/config-docker-compose.ttl
target: /var/www/html/config.ttl
7 changes: 5 additions & 2 deletions dockerfiles/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,13 @@ extension.

**NOTE**: `fuseki:3030` and `fuseki-cache:80` are from the internal Docker network.
To the host machine Docker Compose is exposing these values as `localhost:3030`
and `localhost:9031` respectively.
and `localhost:9031` respectively. The default host port numbers can be overriden
by setting `SKOSMOS_PORT`, `FUSEKI_PORT`, and `CACHE_PORT` env variables in an
`.env` file. This is useful when running multiple Skosmos Docker Compose instances
on the same host but with different port numbers.

To create the containers in this example setup, you can use this command
from the `./dockerfiles/` directory:
from the parent directory (where `docker-compose.yml` is located):

docker compose up -d

Expand Down
Loading