Author: piergiorgio
Date: Wed Apr 20 12:54:44 2022
New Revision: 1900067

URL: http://svn.apache.org/viewvc?rev=1900067&view=rev
Log:
first commit: added Dockerfile for building from source, added a Dockerfile in 
the distribution package and a docker-compose template (CONNECTORS-1492)

Added:
    manifoldcf/branches/CONNECTORS-1492/src/main/docker/compose/
    manifoldcf/branches/CONNECTORS-1492/src/main/docker/compose/Dockerfile
    
manifoldcf/branches/CONNECTORS-1492/src/main/docker/compose/docker-compose.yml
    manifoldcf/branches/CONNECTORS-1492/src/main/docker/compose/properties.xml

Added: manifoldcf/branches/CONNECTORS-1492/src/main/docker/compose/Dockerfile
URL: 
http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1492/src/main/docker/compose/Dockerfile?rev=1900067&view=auto
==============================================================================
--- manifoldcf/branches/CONNECTORS-1492/src/main/docker/compose/Dockerfile 
(added)
+++ manifoldcf/branches/CONNECTORS-1492/src/main/docker/compose/Dockerfile Wed 
Apr 20 12:54:44 2022
@@ -0,0 +1,32 @@
+FROM openjdk:11-jre
+LABEL maintainer="The Apache ManifoldCF Project"
+
+ARG MCF_VERSION=2.21
+ARG MCF_USER=manifoldcf
+ARG MCF_USER_ID=100001
+
+ARG MCF_GROUP=manifoldcf
+ARG MCF_GROUP_ID=100002
+
+ARG APP_DIR=/usr/share/manifoldcf
+
+RUN apt-get update && apt-get install -y iputils-ping
+RUN apt-get update && apt-get install -y dnsutils
+
+RUN wget 
https://dlcdn.apache.org/manifoldcf/apache-manifoldcf-${MCF_VERSION}/apache-manifoldcf-${MCF_VERSION}-bin.tar.gz
 && \
+    tar -xzvf apache-manifoldcf-${MCF_VERSION}-bin.tar.gz && \
+    cp -R apache-manifoldcf-${MCF_VERSION} ${APP_DIR} && \
+    rm apache-manifoldcf-${MCF_VERSION}-bin.tar.gz
+
+COPY properties.xml ${APP_DIR}/example
+
+RUN set -ex; \
+  groupadd -r --gid "$MCF_GROUP_ID" "$MCF_GROUP"; \
+  useradd -r --uid "$MCF_USER_ID" --gid "$MCF_GROUP_ID" "$MCF_USER"
+
+RUN chown ${MCF_USER}:${MCF_USER} -R ${APP_DIR}
+RUN chmod +x ${APP_DIR}/example/start.sh
+
+USER ${MCF_USER}
+WORKDIR ${APP_DIR}/example
+CMD ["./start.sh"]
\ No newline at end of file

Added: 
manifoldcf/branches/CONNECTORS-1492/src/main/docker/compose/docker-compose.yml
URL: 
http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1492/src/main/docker/compose/docker-compose.yml?rev=1900067&view=auto
==============================================================================
--- 
manifoldcf/branches/CONNECTORS-1492/src/main/docker/compose/docker-compose.yml 
(added)
+++ 
manifoldcf/branches/CONNECTORS-1492/src/main/docker/compose/docker-compose.yml 
Wed Apr 20 12:54:44 2022
@@ -0,0 +1,52 @@
+version: "3.9"
+services:
+  mcf-postgres:
+    hostname: mcf-postgres
+    container_name: mcf-postgres
+    image: postgres:13.1
+    deploy:
+     resources:
+       limits:
+         memory: 512M
+       reservations:
+         memory: 512M
+    environment:
+      POSTGRES_HOST_AUTH_METHOD: trust
+      POSTGRES_DB: manifoldcf
+      POSTGRES_USER: manifoldcf
+    ports:
+      - 5433:5432
+    volumes:
+      - mcf-postgres-volume:/var/lib/postgresql/data
+    command: -p 5433
+    networks:
+     - mcf-network
+
+  manifold-cf:
+    build: .
+    hostname: manifold-cf
+    container_name: manifold-cf
+    environment:
+     JAVA_OPTS: "-XX:MinRAMPercentage=80 -XX:MaxRAMPercentage=80"
+
+    image: manifoldcf:2.21
+    deploy:
+     resources:
+       limits:
+         memory: 1g
+       reservations:
+         memory: 1g
+    ports:
+      - 8345:8345
+    depends_on:
+      - postgres
+    restart: on-failure   
+    networks:
+     - mcf-network  
+
+volumes:
+    mcf-postgres-volume:
+
+networks:
+    mcf-network:
+     name: mcf-network
\ No newline at end of file

Added: 
manifoldcf/branches/CONNECTORS-1492/src/main/docker/compose/properties.xml
URL: 
http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1492/src/main/docker/compose/properties.xml?rev=1900067&view=auto
==============================================================================
--- manifoldcf/branches/CONNECTORS-1492/src/main/docker/compose/properties.xml 
(added)
+++ manifoldcf/branches/CONNECTORS-1492/src/main/docker/compose/properties.xml 
Wed Apr 20 12:54:44 2022
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<configuration>
+
+  <property name="org.apache.manifoldcf.login.name" value="admin" />
+  <property name="org.apache.manifoldcf.login.password" value="admin" />
+
+  <!-- Version string for UI -->
+  <property name="org.apache.manifoldcf.versionstring" value="2.21"/>
+  <!-- Point to the wars and configure Jetty -->
+  <property name="org.apache.manifoldcf.crawleruiwarpath" 
value="../web/war/mcf-crawler-ui.war"/>
+  <property name="org.apache.manifoldcf.authorityservicewarpath" 
value="../web/war/mcf-authority-service.war"/>
+  <property name="org.apache.manifoldcf.apiservicewarpath" 
value="../web/war/mcf-api-service.war"/>
+  <property name="org.apache.manifoldcf.usejettyparentclassloader" 
value="true"/>
+  <property name="org.apache.manifoldcf.jettyconfigfile" value="./jetty.xml"/>
+  <!-- Point to the combined war in case we start the single-process example 
that way -->
+  <property name="org.apache.manifoldcf.combinedwarpath" 
value="../web/war/mcf-combined-service.war"/>
+  <!-- Select HSQLDB as the database implementation, and specify where the 
database will be stored -->
+  <!-- <property name="org.apache.manifoldcf.databaseimplementationclass" 
value="org.apache.manifoldcf.core.database.DBInterfaceHSQLDB"/> -->
+    <!-- <property name="org.apache.manifoldcf.hsqldbdatabasepath" value="."/> 
-->
+  
+  
+  <property name="org.apache.manifoldcf.databaseimplementationclass" 
value="org.apache.manifoldcf.core.database.DBInterfacePostgreSQL"/>
+  <property name="org.apache.manifoldcf.database.name" value="manifoldcf"/>
+  <property name="org.apache.manifoldcf.dbsuperusername" value="manifoldcf"/>
+  <property name="org.apache.manifoldcf.dbsuperuserpassword" 
value="manifoldcf"/>
+  <property name="org.apache.manifoldcf.postgresql.hostname" 
value="mcf-postgres"/>
+  <property name="org.apache.manifoldcf.postgresql.port" value="5433" />
+  <!-- <property name="org.apache.manifoldcf.postgresql.ssl" value="false" /> 
-->
+  
+  <property name="org.apache.manifoldcf.database.maxhandles" value="100"/>
+  <property name="org.apache.manifoldcf.crawler.threads" value="50"/>
+  <property name="org.apache.manifoldcf.crawler.historycleanupinterval" 
value="2592000000"/>
+  <!-- Point to a specific logging file -->
+  <property name="org.apache.manifoldcf.logconfigfile" value="./logging.xml"/>
+  <!-- Specify the connectors to be loaded -->
+  <property name="org.apache.manifoldcf.connectorsconfigurationfile" 
value="../connectors.xml"/>
+  <!-- Specify the path to the file resources directory -->
+  <property name="org.apache.manifoldcf.fileresources" 
value="../file-resources"/>
+  <!-- Tell MCF where to find the connector jars -->
+  <libdir path="../connector-lib"/>
+  <libdir path="../connector-common-lib"/>
+  <libdir path="../connector-lib-proprietary"/>
+  <!-- WSDD references -->
+  <!-- Any additional properties go here -->
+</configuration>


Reply via email to