REPO-3046 Add docker configuration for full stack

This commit is contained in:
Alex Mukha
2017-11-20 14:18:19 +00:00
parent ebbd876999
commit 645f0ce957
5 changed files with 199 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
FROM docker-internal.alfresco.com/full-content-services-community:latest
RUN echo -e '\n\
db.driver=org.postgresql.Driver\n\
db.username=alfresco\n\
db.password=alfresco\n\
db.url=jdbc:postgresql://postgres:5432/alfresco\n\
\n\
solr.host=solr6\n\
solr.port=8983\n\
solr.secureComms=none\n\
solr.base.url=/solr\n\
index.subsystem.name=solr6\n\
' >> /usr/local/tomcat/shared/classes/alfresco-global.properties

View File

@@ -0,0 +1,41 @@
version: "3"
services:
alfresco:
build:
context: ./alfresco
environment:
- db.driver=org.postgresql.Driver
- db.username=alfresco
- db.password=alfresco
- db.url=jdbc:postgresql://postgres:5432/alfresco
- solr.host=solr6
- solr.port=8983
- solr.secureComms=none
- solr.base.url=/solr
- index.subsystem.name=solr6
ports:
- 8080:8080 #Browser port
postgres:
image: docker.io/library/postgres:9.4.12
environment:
- POSTGRES_PASSWORD=alfresco
- POSTGRES_USER=alfresco
- POSTGRES_DB=alfresco
ports:
- 5432:5432
solr6:
image: docker-internal.alfresco.com/search-services:1.1.0
environment:
#Solr needs to know how to register itself with Alfresco
- SOLR_ALFRESCO_HOST=alfresco
- SOLR_ALFRESCO_PORT=8080
#Alfresco needs to know how to call solr
- SOLR_SOLR_HOST=solr6
- SOLR_SOLR_PORT=8983
#Create the default alfresco and archive cores
- SOLR_CREATE_ALFRESCO_DEFAULTS=alfresco,archive
ports:
- 8083:8983 #Browser port

13
docker/Dockerfile Normal file
View File

@@ -0,0 +1,13 @@
FROM docker-internal.alfresco.com/content-services-community:latest
RUN mkdir -p /usr/local/tomcat/amps && \
mkdir -p /usr/local/tomcat/amps_share
COPY target/amps /usr/local/tomcat/amps
COPY target/amps_share /usr/local/tomcat/amps_share
COPY target/war /usr/local/tomcat/webapps
RUN java -jar /usr/local/tomcat/alfresco-mmt/alfresco-mmt*.jar install \
/usr/local/tomcat/amps /usr/local/tomcat/webapps/alfresco -directory -nobackup -force && \
java -jar /usr/local/tomcat/alfresco-mmt/alfresco-mmt*.jar install \
/usr/local/tomcat/amps_share /usr/local/tomcat/webapps/share -directory -nobackup -force

129
docker/pom.xml Normal file
View File

@@ -0,0 +1,129 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>content-services-community-docker</artifactId>
<name>ACS Community full Docker image builder</name>
<packaging>pom</packaging>
<parent>
<groupId>org.alfresco</groupId>
<artifactId>full-community-packaging</artifactId>
<version>6.0.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<dependencies>
<dependency>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-share-services</artifactId>
<version>${alfresco.share.version}</version>
<type>amp</type>
</dependency>
<dependency>
<groupId>org.alfresco.aos-module</groupId>
<artifactId>alfresco-aos-module</artifactId>
<version>${alfresco.aos-module.version}</version>
<type>amp</type>
</dependency>
<dependency>
<groupId>org.alfresco.aos-module</groupId>
<artifactId>alfresco-vti-bin</artifactId>
<version>${alfresco.aos-module.version}</version>
<type>war</type>
</dependency>
<dependency>
<groupId>org.alfresco</groupId>
<artifactId>share</artifactId>
<version>${alfresco.share.version}</version>
<type>war</type>
</dependency>
<dependency>
<groupId>org.alfresco.integrations</groupId>
<artifactId>alfresco-googledocs-repo</artifactId>
<version>${alfresco.googledocs.version}</version>
<type>amp</type>
</dependency>
<dependency>
<groupId>org.alfresco.integrations</groupId>
<artifactId>alfresco-googledocs-share</artifactId>
<version>${alfresco.googledocs.version}</version>
<type>amp</type>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.0.2</version>
<executions>
<execution>
<id>unpack-resources</id>
<phase>process-resources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.alfresco</groupId>
<artifactId>share</artifactId>
<version>${alfresco.share.version}</version>
<type>war</type>
<overWrite>false</overWrite>
<outputDirectory>${project.build.directory}/war/share</outputDirectory>
<destFileName>share.war</destFileName>
</artifactItem>
</artifactItems>
</configuration>
</execution>
<execution>
<id>copy-resources</id>
<phase>process-resources</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-share-services</artifactId>
<version>${alfresco.share.version}</version>
<type>amp</type>
<overWrite>false</overWrite>
<outputDirectory>${project.build.directory}/amps</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.alfresco.aos-module</groupId>
<artifactId>alfresco-aos-module</artifactId>
<version>${alfresco.aos-module.version}</version>
<type>amp</type>
<overWrite>false</overWrite>
<outputDirectory>${project.build.directory}/amps</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.alfresco.integrations</groupId>
<artifactId>alfresco-googledocs-repo</artifactId>
<version>${alfresco.googledocs.version}</version>
<type>amp</type>
<overWrite>false</overWrite>
<outputDirectory>${project.build.directory}/amps</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>org.alfresco.integrations</groupId>
<artifactId>alfresco-googledocs-share</artifactId>
<version>${alfresco.googledocs.version}</version>
<type>amp</type>
<overWrite>false</overWrite>
<outputDirectory>${project.build.directory}/amps_share</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@@ -56,6 +56,7 @@
<module>public-javadoc</module>
<module>installer-resources</module>
<module>installer</module>
<module>docker</module>
</modules>
<dependencyManagement>