diff --git a/.env.example b/.env.example index 3e470a3..f8d518a 100644 --- a/.env.example +++ b/.env.example @@ -3,7 +3,7 @@ GRAPH_IMAGE=ghcr.io/arcan-tech/impact-project-graph ICPM_IMAGE=ghcr.io/arcan-tech/impact-change-propagation-model-shiny ICPM_VERSION=snapshot OUTPUT_DIR=./datasets -NEO4J_USER=neo4j +NEO4J_USERNAME=neo4j NEO4J_PASSWORD=password -NEO4J_URL=neo4j://graph-dataset:7687 +NEO4J_URI=neo4j://graph-dataset:7687 CADDY_EMAIL=some@email.com diff --git a/docker-compose-https.yml b/docker-compose-https.yml index d52552f..380b459 100644 --- a/docker-compose-https.yml +++ b/docker-compose-https.yml @@ -4,12 +4,16 @@ services: icpm: container_name: icpm-shiny image: ${ICPM_IMAGE}:${ICPM_VERSION} +# volumes: +# - ./bmed.json:/app/.venv/lib/python3.13/namespaces/bmed.json environment: - NEO4J_URL: ${NEO4J_URL} - NEO4J_USER: ${NEO4J_USER} + NEO4J_URI: ${NEO4J_URI} + NEO4J_USERNAME: ${NEO4J_USERNAME} NEO4J_PASSWORD: ${NEO4J_PASSWORD} depends_on: - - graph-dataset + graph-dataset: + condition: service_healthy + restart: always caddy: image: caddy:latest @@ -33,12 +37,12 @@ services: - '7474:7474' - '7687:7687' environment: - CYPHER_USER: ${NEO4J_USER} + CYPHER_USER: ${NEO4J_USERNAME} CYPHER_PASS: ${NEO4J_PASSWORD} NEO4J_server_memory_heap_initial__size: 1g NEO4J_server_memory_heap_max__size: 4g NEO4J_server_memory_pagecache_size: 2g - NEO4J_AUTH: "${NEO4J_USER}/${NEO4J_PASSWORD}" + NEO4J_AUTH: "${NEO4J_USERNAME}/${NEO4J_PASSWORD}" volumes: - neo4j_data:/data - neo4j_plugins:/plugins @@ -51,6 +55,11 @@ services: memory: 12g # needs to be at least the sum of heap_max_size and pagecache_size reservations: memory: 8g + healthcheck: + test: ["CMD-SHELL", "wget --quiet --tries=1 --spider http://localhost:7474 || exit 1"] + interval: 10s + timeout: 5s + retries: 5 dump-helper: # container with all the mounts ready to be used for dumping image: ${GRAPH_IMAGE}:${GRAPH_VERSION} diff --git a/docker-compose.yml b/docker-compose.yml index 97a19df..35df5d5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,12 +4,16 @@ services: icpm: container_name: icpm-shiny image: ${ICPM_IMAGE}:${ICPM_VERSION} +# volumes: +# - ./bmed.json:/app/.venv/lib/python3.13/namespaces/bmed.json environment: - NEO4J_URL: neo4j://graph-dataset:7687 - NEO4J_USER: ${NEO4J_USER} + NEO4J_URI: ${NEO4J_URI} + NEO4J_USERNAME: ${NEO4J_USERNAME} NEO4J_PASSWORD: ${NEO4J_PASSWORD} depends_on: - - graph-dataset + graph-dataset: + condition: service_healthy + restart: always nginx: image: nginx:latest @@ -28,12 +32,12 @@ services: - '7474:7474' - '7687:7687' environment: - CYPHER_USER: ${NEO4J_USER} + CYPHER_USER: ${NEO4J_USERNAME} CYPHER_PASS: ${NEO4J_PASSWORD} NEO4J_server_memory_heap_initial__size: 2G NEO4J_server_memory_heap_max__size: 8G NEO4J_server_memory_pagecache_size: 4G - NEO4J_AUTH: "${NEO4J_USER}/${NEO4J_PASSWORD}" + NEO4J_AUTH: "${NEO4J_USERNAME}/${NEO4J_PASSWORD}" volumes: - neo4j_data:/data - neo4j_plugins:/plugins @@ -46,6 +50,11 @@ services: memory: 12G # needs to be at least the sum of heap_max_size and pagecache_size reservations: memory: 8G + healthcheck: + test: ["CMD-SHELL", "wget --quiet --tries=1 --spider http://localhost:7474 || exit 1"] + interval: 10s + timeout: 5s + retries: 5 dump-helper: # container with all the mounts ready to be used for dumping image: ${GRAPH_IMAGE}:${GRAPH_VERSION}