This is an automated email from the ASF dual-hosted git repository.

petko pushed a commit to branch migration-translation-opengrok
in repository https://gitbox.apache.org/repos/asf/openoffice-devtools.git

commit fa039d321d8d04bf38151035dea850fe2a9ba4eb
Author: Peter Kovacs <[email protected]>
AuthorDate: Mon Aug 18 19:21:57 2025 +0200

    add opengrok image build
---
 images/opengrok/.env                |  4 +++
 images/opengrok/docker-compose.yaml | 50 +++++++++++++++++++++++++++++++++++++
 2 files changed, 54 insertions(+)

diff --git a/images/opengrok/.env b/images/opengrok/.env
new file mode 100644
index 0000000..f7e9f7c
--- /dev/null
+++ b/images/opengrok/.env
@@ -0,0 +1,4 @@
+#opengrok_src=/x1/opengrok/src
+opengrok_src=/x1/opengrok/src
+opengrok_data=/x1/opengrok/data
+opengrok_config=/x1/opengrok_config
\ No newline at end of file
diff --git a/images/opengrok/docker-compose.yaml 
b/images/opengrok/docker-compose.yaml
new file mode 100644
index 0000000..bfac18a
--- /dev/null
+++ b/images/opengrok/docker-compose.yaml
@@ -0,0 +1,50 @@
+# Docker Compose configuration for OpenGrok
+services:
+  opengrok:
+    container_name: aoo-opengrok
+    #image: opengrok/docker:latest
+    image:  opengrok/docker:latest
+    ports:
+      - "8080:8080" # Maps host port 8080 to container port 8080 (where 
OpenGrok's web interface runs)
+    volumes:
+      # Mount your source code directory here. Replace ./src with the actual 
path to your source code.
+      # OpenGrok will index all subdirectories within this path.
+      - "${opengrok_src}:/opengrok/src" #/x1/opengrok/src
+
+      # Named volume for OpenGrok data (indexed files, history, etc.)
+      # This ensures your indexed data persists even if the container is 
removed or updated.
+      - "${opengrok_data}:/opengrok/data" #/x1/opengrok/data
+
+      # Optional: Volume for OpenGrok configuration files.
+      # This allows you to persist custom configurations.
+      - "${opengrok_config}:/opengrok/etc" #/x1/opengrok_config
+
+      # Optional: If your source repositories require SSH for cloning/updating 
(e.g., private Git repos),
+      # uncomment and replace with the path to your .ssh folder on the host.
+      # - "${HOME}/.ssh:/root/.ssh:ro"
+
+      # Optional: Mount host's localtime to ensure consistent timestamps
+      - "/etc/localtime:/etc/localtime:ro"
+    environment:
+          # These are default and usually good enough, but illustrate:
+      - OPENGROK_PROJECTS=AOO41XX   # Optional: Name your project
+      - OPENGROK_WEBAPP_CONTEXT=/opengrok/src        # Webapp path
+      - OPENGROK_REFRESH_INTERVAL=1440   # Indexing interval in minutes (daily)
+
+      # --- This is the key part for indexing! ---
+      # This tells OpenGrok to index everything under /opengrok/src
+      # and put the index data in /opengrok/data.
+      # The '--sync' or '--scan-repositories' (newer) argument helps with VCS 
detection.
+      - OPENGROK_INDEXER_ARGS=-U /opengrok/src -d /opengrok/data 
--scan-repositories
+      # How often OpenGrok should synchronize and re-index repositories (in 
minutes).
+      # Set to 0 to disable automatic synchronization.
+      - SYNC_PERIOD_MINUTES=60
+      # - INDEXER_OPT="-W /opengrok/etc/configuration.xml" # Example for 
passing indexer options
+      - OPENGROK_OPTS=-Xmx14g # Java options for OpenGrok, adjust as needed
+    restart: on-failure # Restarts the container if it exits due to an error
+
+volumes:
+  opengrok_data:
+    driver: local
+  # opengrok_config: # Uncomment if you use the opengrok_config volume
+  #   driver: local

Reply via email to