diff --git a/.gitignore b/.gitignore index 675cde0186efd1de14bf606b97407fe78bebd372..1a39d3321437f26b671b3c21afaa1a8d68bc8c88 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ logs/nginx/log/access.log logs/nginx/log/error.log logs/opensilex/opensilex.log +logs/opensilex/** \ No newline at end of file diff --git a/README.md b/README.md index 549b162f6cf326da5696d9070f6677bb420ae518..56b7b10b803ff70ed7a3dcd92393b59912938cb0 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Docker compose environnent to deploy opensilex stack based on a previous work en - Clone this repository : ```bash - git clone https://github.com/OpenSILEX/opensilex-docker-compose + git clone --branch 1.0.0-rc+3.1 https://github.com/OpenSILEX/opensilex-docker-compose ``` You must run docker compose up command : @@ -21,23 +21,33 @@ You must run docker compose up command : docker-compose up ``` +PS: If you want to start docker-compose in daemon mode, run the following command : ``docker-compose up -d `` + + +This will start the docker-compose stack. + + - Create an administrator user +Open a new terminal + ```bash docker exec -it opensilex ./bin/opensilex.sh user add --admin --email=admin@opensilex.org --lang=fr --firstName=firstName --lastName=lastName --password=admin ``` + ### Test application -Wait few seconds and try to load http://localhost/app Opensilex application home page +Wait few seconds and try to load http://localhost:8081 Opensilex application home page By default, differents availables services can be found at these adresses : - Web : - - Opensilex application : http://localhost/app - - RDF4J Workbench : http://localhost/rdf4j-workbench -- Internal : + - Opensilex application : http://localhost:8081 + - RDF4J Workbench : http://localhost:8080 - MongoDB port : http://localhost:27017 +### Customize docker port +Configure ``docker-compose.yml`` file to configure opensilex stack ports ### Customize config file Configure config/opensilex.yml file to configure opensilex stack @@ -47,6 +57,10 @@ Configure config/opensilex.yml file to configure opensilex stack Update host parameters if needeed on docker-compose.yml and opensilex.env files. *TODO* -#### Acknowledgments +## Manage docker + +In order to manage your docker stack via an web interface, we suggest you to use [Portainer CE edition](https://docs.portainer.io/start/install?_ga=2.152302650.2059608137.1662022383-1714209046.1662022383) + +## Acknowledgments Olivier Fangi & Co - [P2M2 Team](https://github.com/p2m2) \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index cf07cf9a0b349076ff20c1638231842540f040c7..147b116449e6cf58980fb5543fd89c8c52bb2134 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,7 +3,7 @@ version: "3.5" services: mongo: container_name: mongodb - image : mongo:5.0.9 + image : mongo:5.0.11 restart: always volumes: - persist_mongo_data:/data @@ -20,17 +20,18 @@ services: rdf4j: container_name: rdf4j - image: eclipse/rdf4j-workbench:3.7.6 + image: eclipse/rdf4j-workbench:3.7.4 env_file: opensilex.env volumes: - persist_rdf4j_data:/var/rdf4j - + ports: + - "8080:8080" opensilex: container_name: opensilex build: context: . args: - RELEASE_TAG: 1.0.0-rc+3 + RELEASE_TAG: 1.0.0-rc+4.1 dockerfile: opensilex-build-step.docker env_file: opensilex.env depends_on: @@ -40,23 +41,13 @@ services: - ./config:/home/opensilex/config - ./logs/opensilex:/home/opensilex/logs - persist_opensilex:/home/opensilex/data + ports: + - "8081:8081" command: > bash -c " ([ ! -f /home/opensilex/data/first_install ] && touch /home/opensilex/data/first_install && ./bin/opensilex.sh system install) ./bin/opensilex.sh server start --host=localhost --port=8081 --adminPort=4081 " - nginx: - container_name: nginx - image: nginx:1.17 - env_file: opensilex.env - volumes: - - ./nginx.conf:/tmp/nginx.conf - - ./logs/nginx/log:/var/log/nginx - depends_on: - - opensilex - ports: - - "80:80" - command: /bin/bash -c "envsubst < /tmp/nginx.conf > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'" volumes: persist_rdf4j_data: diff --git a/nginx.conf b/nginx.conf deleted file mode 100644 index 60b2387180bef933a44f2b752919b2b5216f4668..0000000000000000000000000000000000000000 --- a/nginx.conf +++ /dev/null @@ -1,45 +0,0 @@ - -resolver 127.0.0.11 valid=300s; -resolver_timeout 10s; - -server { - listen ${NGINX_PORT} default_server; - listen [::]:${NGINX_PORT} default_server; - - root /var/www/html; - - # Add index.php to the list if you are using PHP - index index.html index.htm index.nginx-debian.html; - - server_name ${NGINX_HOST}; - - client_body_in_file_only clean; - client_body_buffer_size 32K; - - client_max_body_size 300M; - - - - location / { - proxy_pass http://${OPENSILEX_HOST}:8081/$request_uri; - proxy_set_header X-Forwarded-Host ${NGINX_HOST}; - proxy_connect_timeout 600; - proxy_send_timeout 600; - proxy_read_timeout 600; - send_timeout 600; - proxy_set_header X-Real-IP ${NGINX_HOST}; - } - - # uncomment to access triplestore url - location /rdf4j-server { - proxy_pass http://${RDFSTORE_HOST}:8080/rdf4j-server/; - proxy_set_header Host ${NGINX_HOST}; - #rewrite ^/(.*)$ $1 permanent; - } - - location /rdf4j-workbench { - proxy_pass http://${RDFSTORE_HOST}:8080/rdf4j-workbench/; - proxy_set_header Host ${NGINX_HOST}; - #rewrite ^/(.*)$ $1 permanent; - } -} \ No newline at end of file diff --git a/opensilex.env b/opensilex.env index 094e14290d9fe8a60183b9e8c8ab27350c203f95..e89816cf3fb87b342818ae6a6d04aeb4e41a66fa 100644 --- a/opensilex.env +++ b/opensilex.env @@ -1,12 +1,9 @@ -RDF4J_JAVA_OPTS="-Xmx1g" +RDF4J_JAVA_OPTS="-Xms1g -Xmx4g" RDFSTORE_SPARQL=http://rdf4j:8080/rdf4j-workbench/repositories/opensilex/query RDFSTORE_HOST=rdf4j MONGO_HOST=mongo OPENSILEX_HOST=opensilex -NGINX_HOST=localhost -NGINX_PORT=80 - COMPOSE_PROJECT_NAME=opensilex-stack